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
What is f'n in math?
Explain function?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
What is bash c?
What are the 5 data types?
Tell us the use of fflush() function in c language?
What is wrong in this statement?
Which header file is essential for using strcmp function?
Is the exit() function same as the return statement? Explain.
the question is that what you have been doing all these periods (one year gap)
Why do we use main function?
What is d'n in c?
Explain what are binary trees?
Do you know the difference between malloc() and calloc() function?
What is malloc and calloc?