answersLogoWhite

0


Best Answer

void print_evens (size_t n) {for (size_t x=0; x<=n; x+=2) {

std::cout << x << std::endl;

}

}

User Avatar

Wiki User

5y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How to write a program in c plus plus to print table of even number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


How do you write multiplication table program in php?

// example of 1..12x12 table for($i = 1; $i &lt;= 12; $i++) { for($j = 1; $j &lt;= 12; $j++) { print ($i * $j) ." "; } print "\n"; }


Write an assembly language program to print a to z on screen?

write a program to print A to Z on screen in c?


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


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?


Write a unix program to print print a pattern?

echo 'print a pattern'


Program for print prime all number from 1 to 100 in foxpro?

Prime numbers are numbers that are only divisible by themselves and the number 1. You can write a program to print all prime numbers from 1 to 100 in FoxPro.


Write a program to print the table of any number using two dimensional array in c program?

/* PROGRAMME TO PRINT THE TABLE OF A GIVEN NUMBER USING FUNCTION */#include#includevoid table(int,int);void main(void){int num,i;printf("\n Programme to print the mathematical table of a number.");printf("\n Enter the number : ");scanf("%d",&num);printf("\n Upto how many multiples of the given number do you want? ");scanf("%d",&i);table(num,i);getch();}void table(int num,int i){for(int j=1;j


How do you write program c of table 5?

#include#includevoid main(){ int a,i;printf("\nThe Multiplication table of 5 is:\n");for(i=1;i


Write a qbasic program to accept a no and print it multiple table?

Cls print the multiples tables of 1 to 5 for x=1 to 5 for y=1 to 10 print x;"*";y;"=";x*y next y print print next x end


Write a C program to print the following series 112 122 . 1n2?

write a program to print the series 1/12+1/22+.........+1/n2 ?


Write a program in vbscript to display a multiplication table in web page?

Option explicit Dim val,indx val=inputbox("enter any number") For indx= 1 to 10 print val&amp;"*"&amp;indx&amp;"="&amp;val&amp;"*"indx Next