Want a Free Job Posting?

Buy a job posting today and the second one is on us. For a limited time only. Act Now.

Interview Question

Interview Sofia (Bulgaria)

Q1: How will you count the number of ALL numbers up to

  100 which are even?

Interview Answer

1 Answer


#include<iostream.h> #include<conio.h> void main() { int c=0; for(int i=0;i<100;i++) { if(i%2==0) c++; } cout<<"the total no of even no;s are"<<c; getch(); }

Anonymous on Jun 18, 2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.