hello all
can any body help me to correct this code please :cry: :cry:
i want it so it can print whats n is in these different cases.
this is my code and thanks alot for your help
#include <stdio.h>
#include <iostream.h>
#include <stdlib.h>
void main()
{
int ave, 1st, 1:2, 2:2, 3rd, pass, fail;
ave=85; //for example
if (ave>=70)
{
n=first;
}
else
if ((ave>=60)&&(ave<=69))
{
n=2:1;
}
else
if ((ave >=50)&&(ave<=59))
{
n=2:2;
}
else
if ((ave>=40)&&(ave<=49))
{
n=3rd;
}
else
if ((ave>=35)&&(ave<=40))
{
n=pass;
}
else if(ave<35)
{
n=fail;
}
cout<<n<<endl;
}