we provide you the c downloads,c programing,c tutorials and much more at www.cplusplus-in.blogspot.com.Codes of c++ are also there for your help.This blog build your c programing style.
Showing posts with label code for determine that given number is odd or even. Show all posts
Showing posts with label code for determine that given number is odd or even. Show all posts
Sunday, 10 June 2012
source code of c++(checks for an even number)
The source code of c++(checks for an even number)
// checks for an even number
#include <iostream>
using namespace std;
int main(){
int num;
cout << "Give me any number: ";
cin >> num;
if (num % 2 == 0) {
cout << "It's even!" << endl;
}else{
cout << "It's odd!" << endl;
}
system("pause");
}
End
Subscribe to:
Posts (Atom)
