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 |
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.
how to find the largest of given numbers in an array
can you explain how to use JavaBean in Project
What is polymorphism what are the different types of polymorphism?
Why many objects can working together? How objects working togetherM I want to see example code.
can you give the dynamic polymorphism types?
What is an interface in oop?
What is Method overloading?
explain dynamic binding by drowing
What is encapsulation in oops?
What is difference between oop and pop?
In what situation factory design patterns,DAO design patterns,singleton design patterns should be applied.?