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
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.
How to Throw some light on the splay trees?
Explain what is the difference between #include and #include 'file' ?
What is a string?
Is array name a pointer?
What are run-time errors?
What is extern keyword in c?
How can I use a preprocessorif expression to ?
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?
What are the ways to a null pointer can use in c programming language?
What are c header files?
What is c preprocessor mean?
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.
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
Is there a way to jump out of a function or functions?