Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

What are the advantages of inheritance?

26 Answers   IBS, TCS,


How do you define social class?

0 Answers  


WAP find square root of any number (without using sqrt() )?

3 Answers  


What is differance between Abstract and Interface

3 Answers  


what uses of c++ language?

3 Answers  


Base class has two public data members. How can i derive a new class with one datamember as public and another data member as private?.

2 Answers  


What is class and example?

0 Answers  


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

1 Answers  


what isthe difference between c structure and c++ class

5 Answers  


How can you overcome the diamond problem in inheritance?

0 Answers   NIIT,


what is polymorpsim? what are its types?

8 Answers  


What is meant by multiple inheritance?

0 Answers  


Categories