write a program which counts a product of array elements
lower than 10.



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

Post New Answer

More C Interview Questions

write a c program to find the roots of a quadratic equation ax2 + bx + c = 0

11 Answers   CSC, St Marys, TATA,


write a program to delete an item from a particular location of an linear array?

1 Answers  


Why do u use # before include in a C Progam?

9 Answers   IBM,


what is difference between array,strutter,union and pointers

3 Answers   CTS, Lovely Professional University, Mannar Company,


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

0 Answers  






What are the different types of constants?

0 Answers  


Explain how do you determine a file’s attributes?

0 Answers  


parkside's triangle.. create a program like this.. enter the size: 6 enter the seed: 1 output: 1 23 456 7891 23456 789123 sample2: enter the size: 5 enter the seed: 3 output: 3 45 678 9123 45678 parkside should not exceed 10 while its seed should only be not more than 9..

4 Answers  


#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } what will happen if you executed this code?

4 Answers   Ramco,


Expand the following LKB BKL FFG

0 Answers  


What is a double c?

0 Answers  


how many argument we can pas in in a function

25 Answers   CTS,


Categories