Nov 6, 2010 at 8:19pm UTC
#include <iostream>
using namespace std;
void main()
{
float a;
cout<<" enter your number";
cin>>a;
if(a=(100 ^ 90));
cout<<"exlant";
if(a=(90 ^ 80));
cout<<"very good";
if(a=(80 ; 60));
cout<<"good";
if(a=(60 ^ 0));
cout<<"bad";
system ("pause");
}
Nov 6, 2010 at 8:49pm UTC
many things. by 100 ^ 90 I assume you meant a range? surely you couldn't have meant 10090 .. if you want a range, write if (a <= 100 && a > 90)
also, main() mustn't be void. it must be int, and return 0 upon success.
Nov 6, 2010 at 9:52pm UTC
-------------------------------------------
#include <iostream>
using namespace std;
void main()
{
float a;
cout<<" enter your number";
cin>> a;
if(a <= 100 && a > 90);
cout<<"exlant";
if(a <= 89 && a > 80);
cout<<"very good";
if(a <= 79 && a > 59);
cout<<"good";
if(a <= 60 && a > 0);
cout<<"bad" ;
system ("pause");
}
-----------------------------
i have an error agin i can't get this
Nov 6, 2010 at 10:13pm UTC
Try int main() and return 0;
Nov 6, 2010 at 10:53pm UTC
#include <iostream>
using namespace std;
int main()
{
int a;
cout<<"enter your number:";
cin>> a;
if(a <= 100 && a > 90);
cout<<"\n excllant";
if(a <= 89 && a > 80);
cout<<"\n very good";
if(a <= 79 && a > 59);
cout<<"\n good";
if(a <= 60 && a > 0);
cout<<"\n bad" ;
return 0;
}
--------------------------
its print all i need to print one if i add number ,
Nov 6, 2010 at 11:03pm UTC
Remove the ;'s behind the if statements.
Nov 6, 2010 at 11:08pm UTC
thank you vrey much " kyon " you A Best Programer in C++
My program has working