answersLogoWhite

0

#include

using std::cout;

using std::endl;

int main()

{

int sum = 0;

cout << endl << "Sum is: ";

for (int i = 2; i <= 100; i += 2)

{

sum += i;

}

cout << sum << endl;

system("PAUSE");

return 0;

}

* The code was compiled in VS2008.

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Math & Arithmetic
Related Questions

Write a program to aceept 5 numbers from keyboard n print itz total?

#include using std::cin;using std::cout;using std::endl;int main(){int arrSize = 5;double arr[arrSize] = {0.0};cout


How do you write a program which reads a list of ten numbers and print the list in reserve order in c program?

The simplest way is probably to read the numbers into an array and then prints each element of the array starting at the last one and moving backwards.


Demonstrate a program that prints numbers in ascending order.?

#include&lt;iostream&gt; int main() { for (int i=0; i&lt;100; ++i) std::cout&lt;&lt;i&lt;&lt;std::endl; }


What is one tool for reverse engineering software and five features of that tool?

hexadecimal dumper, which prints or displays the binary numbers of a program in hexadecimal format.


Write a program that calculates and prints the sum of the even integers from 2 to 30?

For N = 2 to 30 STEP 2 Sum = Sum + N Next N Print "The sum is "; Sum; ". Have a nice day. Come back and see us." END


How did menu's develop?

A restaurant prints it out using a special program


Create a program which accepts a number not less than 10The program prints the reverse of the number?

ten


How do you write a c program that prints a box an oval an arrow and a diamond?

You first learn how to program in C.


C plus plus program using for loop that prints all even numbers between and including 10 and 1000?

#include using std::cout;using std::endl;int main(){cout


A program prints vertically a numbers in c program?

It is too easy................ //Program to print numbers vertically #include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int last_no; int i; clrscr(); i=0; printf("Enter your last num.I will print 0 to that number"); scanf("%d",&amp;last_no); printf("\n"); while(i&gt;last_no) { printf("%d\n",i); i++; } getch(); } //poo.papule


What is the difference between finger prints?

Nobody's finger prints are the same. Every person in the world has different finger prints. Even identical twins have different prints.


How is MIcr used by banks in check processing?

It prints numbers at the bottom of a cheque.