write a program which counts a product of array elements
lower than 10.
Answer / 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 |
what is the output of the following code? main() { int I; I=0x10+010+10; printf("x=%x",I); } give detailed reason
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
which is the best site or book for learning C...and i need the content for C..how to get the good programming skills....? can plz suggest me....
write the program for maximum of the following numbers? 122,198,290,71,143,325,98
fun(int x) { if(x > 0) fun(x/2); printf("%d", x); } above function is called as: fun(10); what will it print? }
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
Do you know what is the purpose of 'extern' keyword in a function declaration?
Why static is used in c?
What is the memory allocated by the following definition ? int (*x)[10];
what r the cpu registers r ther?
How can I run c program?
c programming of binary addition of two binary numbers