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 |
How to reverse a sentence in c program ex: ram is a good boy answer: boy good a is ram
Given two strings like x=?hello? and y=?open?, remove any character from string x which is also used in string y, thus making the result x=?hll?.
What is destructor in oop?
What is namespace?
What is the use of oops?
what is the difference between function template and template of function?explain with example.
What is difference between polymorphism and inheritance?
what is difference b/w object based and object oriented programming language?
18 Answers Chaitanya, College School Exams Tests, Educomp, IBM, Infosys, Telko,
Why do we use encapsulation in oops?
Can we have a private virtual method ?
The company is a fake company asking for money of RS10000 while training and not offering a job after training. My humble request to you people not to attend Astersys interview
What is static in oop?