TrueOrFalse.cpp

Shkarkuar 536 herë. Ngarkuar më Mars 2010

c++
true
or
false
Shkarko Kthehu ne C++
#include <iostream.h>
#include <stdlib.h>
 using namespace std;
 
char* BoolNeStr(bool b)
{
    char* msg;
     
     if (b)
       msg = "True";
     else
       msg = "False";
       
     return msg;
}
 
int main ()
{
 int a, b, c;
 
 a=2;
 b=3;
 c=6;
 
 
 system ("color f0");
 cout <<BoolNeStr(a==5)<<  "\n";
 cout <<BoolNeStr(a*b>=c)<< "\n";
 cout <<BoolNeStr(b+4>a*c) << "\n";
 cout <<BoolNeStr((b=2)==a)<< "\n";
 cout <<BoolNeStr((a>b)||(c>b))<< "\n";  
 system ("pause");
    
 return 0;   
}