create a c++ program that will ask 10 numbers and display
their sum using array.
Answer / sneha shahade
#include<conio.h>
#include<iostream.h>
void main()
{
int a[10],i,s=0;
cout<<"enter 10 numbers";
for(i=0;i<10;i++)//loop to get 10 no. in array
cin>>a[i];
for(i=0;i<10;i++)//loop to find sum of 10 no.
s=s+a[i];
cout<<"sum is:"<<s;//display sum
getch();
}
| Is This Answer Correct ? | 9 Yes | 0 No |
What polymorphism means?
What is difference between pop and oop?
why freind function takes more parameter than normal member function in c++?
How can we use the preprocessor #if and #elseif.
Tell us about yourself.
47 Answers ABB, Amazon, Fidelity, Flextronics, Franklin Templeton, HCL, Hexaware, IBM, Impetus, Infosys, Reliance, Rofous, Silgate, Sutherland, TCS, Thomson Reuters, Virtusa, Wipro,
WILL I GET A guaranteed JOB AFTER DOING bsc()IT) and GNIIT from an NIIT CENTRE??
21 Answers Biocon, MIT, NIIT,
write a program for function overloading?
14 Answers HCL, InfoCity, TATA,
namespace is working on which compiler?
Why do while loop is used?
What is pure oop?
what is the technical or oop name of object?
Why do we need polymorphism in c#?