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

1 comment:

  1. thank you for sharing nice article in your blog
    visit
    web programming tutorial
    welookups

    ReplyDelete