create a c++ program that will ask 10 numbers and display
their sum using array.



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

Post New Answer

More OOPS Interview Questions

Can you explain polymorphism?

0 Answers  


what is function over loading?

5 Answers  


what is the 3 types of system development life cycle

1 Answers  


what is namespace? what are the uses of namespace?

1 Answers  


Difference between over loading and over ridding?

12 Answers   CTS, Patni, Softvision Solution,


sir i want to know which posting to apply since i am BE CSE.. also want to know what are the rounds there for my interview...Expecting for ur valuable answer....

2 Answers  


Conversion from a basic type to a class type may be achieved using______________

5 Answers   HCL,


which feature are not hold visual basic of oop?

0 Answers   Ignou,


polymorphism means?

6 Answers   BFL,


What is oops in programming?

1 Answers  


What is abstrac class?where is it use?

2 Answers  


What makes a language oop?

0 Answers  


Categories