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 4 main oop principles?
what is the new version of oops
Why do we use oop?
The type of variable a pointer points to must be the part of pointer's definition so that:
is java purely oop Language?
49 Answers HCL, Infosys, TCS,
I hv a same function name,arguments in both base class and dervied class, but the return type is different. Can we call this as a function overloading? Explain?
Write a C++ program to conduct an election of a mayor.Declare a class ELECTION With the following specification: Data member: Name 25 character Age Integer symbol 1 character Member functions: To accept data for 20 contestant To accept symbol as voting from 100 voters. To declare the winner and the loser.
1 Answers Global Academy, Infotech,
what is function over loading?
What is the difference between the C & C++?
to remove the repeated numbers from the given . i.e.., if the input is 12233 output should of 123
What are generic functions and generic classes?
Why it is called runtime polymorphism?