Equation in C

Hey i am new new on this,i am in 9th grade in and i am trying to put a equation in c. Sorry for the english cause I´m from Portugal

float n1, y, pair;
cout << "Insert a number ";
cin >> n1;

And now I need to put in c
pair =(n1 / 2 == y)
pair =(2 * y == y)
pair = (n1 - y);
How i put this?
Last edited on
1
2
pair =(n1 / 2 == y) 
pair =(2 * y == y) 

What are you trying to do here?

== is the equality operator and doesn't make any sense in this context. Also, y has not been initialized, so using it in an operation will give undefined results.
Topic archived. No new replies allowed.