#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,s=0;
for(i=2;i<=100;i=i+2)
{
s=s+i;
cout<<"+"<<i;
}
cout<<"="<<s;
getch();
}
Not Satisfied ? Just search & get the result
Related posts:
- Sample – Program to find the sum of each row & column of a matrix of size n x m and if matrix is square, find the sum of the diagonals also..
- C++ program – Implementation of class
- Sample – Program to find the sum of either of the diagonals of a 4 x 4 matrix.
- Sample – Program to enter a sentence and output the number of uppercase & lowercase consonants, uppercase & lowercase vowels in sentence..
- C++ program – Swap two variables using function overloading
