create a c++ program that will ask 10 numbers and display
their sum using array.
Answer Posted / 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 View All Answers
What is advantage of inheritance?
Why is there no multiple inheritance?
What is difference between oop and pop?
What is pointer in oop?
What does and I oop and sksksk mean?
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.
What is coupling in oops?
What is abstraction oop?
How to use CMutex, CSemaphore in VC++ MFC
What are the 3 pillars of oop?
which feature are not hold visual basic of oop?
Can we have inheritance without polymorphism?
to find out the minimum of two integer number of two different classes using friend function
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
What is encapsulation selenium?