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...

write a 'c' program to sum the number of integer values

Answer Posted / chandra

#include<stdio.h>
#include<conio.h>
main()
{
int a[25],n,i,sum=0;
printf("enter n value");
scanf("%d",&n);
printf("\n Enter the numbers");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
sum+=a[i];
printf("\nSum of the given numbers is %d",sum);
}

Is This Answer Correct ?    11 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I heard that you have to include stdio.h before calling printf. Why?

1060


Who developed c language and when?

1057


Where register variables are stored in c?

958


How do you search data in a data file using random access method?

1298


Write a code to remove duplicates in a string.

1019


What is quick sort in c?

1083


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

1081


What is linear search?

1132


By using C language input a date into it and if it is right?

1072


What are # preprocessor operator in c?

1101


what do you mean by enumeration constant?

1009


How do you define CONSTANT in C?

1267


What is a shell structure examples?

1092


Differentiate between null and void pointers.

1161


What is size of union in c?

1016