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.

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


Please Help Members By Posting Answers For Below Questions

What is the use of oops?

993


Why is static class not inherited?

1041


What is the diamond problem in inheritance?

1072


What is class in oop with example?

1039


why reinterpret cast is considered dangerous?

2336


What is ambiguity in inheritance?

1051


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

2042


What is oops in simple words?

1033


What is overloading in oop?

958


is there any choice in opting subjects like 4 out of 7

2131


i got a backdoor offer in process global,Bangalore..Can i work with it?

2791


What is difference between data abstraction and encapsulation?

1032


What is difference between abstraction and encapsulation?

1019


What is polymorphism give a real life example?

972


Whats is abstraction in oops?

1022