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
Explain high-order and low-order bytes.
Why flag is used in c?
What are derived data types in c?
Are comments included during the compilation stage and placed in the EXE file as well?
In C programming, how do you insert quote characters (‘ and “) into the output screen?
What is the use of typedef in c?
Is it possible to pass an entire structure to functions?
how to write a c program to print list of fruits in alpabetical order?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
What are types of functions?
What is the maximum no. of arguments that can be given in a command line in C.?
What are the types of data types and explain?
List a few unconditional control statement in c.
What are enumerated types?