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

When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.

1979


How to Throw some light on the splay trees?

1059


Explain what is the difference between #include and #include 'file' ?

1018


What is a string?

1109


Is array name a pointer?

1027


What are run-time errors?

1113


What is extern keyword in c?

1129


How can I use a preprocessorif expression to ?

1058


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

1253


What are the ways to a null pointer can use in c programming language?

1135


What are c header files?

988


What is c preprocessor mean?

1306


Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.

2231


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

1250


Is there a way to jump out of a function or functions?

1091