# Answer to Question #6845 in C++ for Lali

Question #6845

A c++ program that asks the user to type 10 integers and then writes the sum of the integers

Expert's answer

#include <iostream.h>

&

int i,integer,sum=0;

void main(){

for (i=1;i<=10;i++){

& cout<<"Enter an integer:";

& cin>>integer;

& sum = sum + integer;

}

cout<<" The sum of entered integers is "<<sum<<"\n";

}

&

int i,integer,sum=0;

void main(){

for (i=1;i<=10;i++){

& cout<<"Enter an integer:";

& cin>>integer;

& sum = sum + integer;

}

cout<<" The sum of entered integers is "<<sum<<"\n";

}

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment