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 program which counts a product of array elements
lower than 10.

Answer Posted / rajasekharreddy

#include<stdio.h>
#define SIZE 20
int main()
{
int arr[SIZE],arr_Size,i,mul=1;

printf("Printf array size\t");
scanf("%d",&arr_Size);

printf("\nenter numbers\t");
for(i=0;i<arr_Size;i++)
{
scanf("%d",&arr[i]);
}

printf("you entered numbers\t");
for(i=0;i<arr_Size;i++)
{
printf("%d\t",arr[i]);
}

for(i=0;i<arr_Size;i++)
{
if(arr[i]<10)
{
mul=mul*arr[i];
}
}

printf("\nout put is\t%d",mul);
return 0;
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is malloc() function?

1233


How do you redirect a standard stream?

1150


main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

1153


What is c language used for?

1026


How can you increase the size of a statically allocated array?

1120


A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

1305


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

1070


What is the main difference between calloc () and malloc ()?

1233


Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

4361


What is #line in c?

1074


What is equivalent to ++i+++j?

1146


What is bash c?

1063


What is the difference between c &c++?

1208


What is data structure in c programming?

1129


can we implement multi-threads in c.

1177