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

Are left thumb prints identical to right thumb prints?

No, I did a science project, I got many fingerprints. A lot of them were the same but not all. Some had crazy prints! I had 25 prints and about 5 had different prints


Is currency with mismatch serial numbers worth anything?

Definitely. This error can be worth over $100 depending on the bill's condition.A mismatched serial number occurs when one of the two counters that prints the numbers gets stuck.


How do I write a program that inputs the length of two pieces of fabric in feet and inches (as whole numbers) and prints the total. Enter the Feet for the first piece of fabric 3 Enter the Inches for?

An example: Feet for first piece of fabric: 2 Inches for first piece of fabric: 7 Feet for 2nd piece of fabric: 2, Inches for 2nd piece of fabric: 6 I need the program to print: Feet: 5 Inches: 1


How many syllables does the word 'prints' have?

The word prints has one syllable.


Writing a program which prints a text of 4 lines consisting of characters integer values and floating point values using print statement?

To write a program that prints a text of 4 lines consisting of integer and floating point values, you can use formatted strings in Python. Here's a simple example: int_value = 42 float_value = 3.14 print(&quot;Line 1: Integer value is&quot;, int_value) print(&quot;Line 2: Float value is&quot;, float_value) print(&quot;Line 3: Sum of values is&quot;, int_value + float_value) print(&quot;Line 4: Float value to two decimals is {:.2f}&quot;.format(float_value)) This code snippet prints four lines, showcasing both integer and floating point values.

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.