answersLogoWhite

0


Best Answer
  1. #include

void main()

{

int num,i;

printf("\n Enter number upto which even numbers must be displayed \t");

scanf("%d",&num);

printf("\n Even numbers less than %d are \n",num);

for(i=2;i

{

printf("%d ",i);

}

getch();

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

int myVarible = 0;

...

cin >> myVariable;

...

if (myVariable % 2)

{

...

}

...

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

#include<iostream>

int main()

{

for(int even=2; even<=1000000; even+=2)

std::cout<<even<<std::endl;

}

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Yes, yes, please do.

This answer is:
User Avatar

User Avatar

Anonymous

Lvl 1
3y ago

2

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a c plus plus program to print even numbers using for loop?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program in qbasic to make a hut using print statemant?

a triangle then a square :)


How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


Write c program to print palindrome using string without using strrev strlen strcam?

sdfdg


Write a program to Print pyramid of numbers using java?

hi question is here, 1 1 2 1 2 3 1 2 3 4


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


Write a program that read phrase and print the number of lower-case letter in it using function of counting?

write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


Write a FORTRAN program using if statement to calculate the smallest of three numbers xyz?

N = x If y &lt; N then N = Y If z &lt; N then N = z Print N


You want to write a simple without using pointer or array c program which will print greatest number when you give 20 number?

i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?


How do you write a c program to print n no's required using while loop?

int i=0; while (i++&lt;n) { /*...*/ }


Write a program to find the product of two numbers using Halving and Doubling method?

i need this answer


How do you write a program using the gotoxy statement and print function to display letters of the alphabet on the computer screen?

There is no gotoxy statement in C.