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 are the advantages of inheritance?
26 Answers IBS, TCS,
How do you define social class?
WAP find square root of any number (without using sqrt() )?
What is differance between Abstract and Interface
what uses of c++ language?
Base class has two public data members. How can i derive a new class with one datamember as public and another data member as private?.
What is class and example?
create a c++ program that will ask 10 numbers and display their sum using array.
what isthe difference between c structure and c++ class
How can you overcome the diamond problem in inheritance?
what is polymorpsim? what are its types?
What is meant by multiple inheritance?