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 does a function declared as pascal do differently?
what is the main use of c where it can use the c
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
What is the difference between malloc() and realloc()?
Explain the term printf() and scanf() used in c language?
what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; a.9 b.8 c.6 d.7
What is the importance of c in your views?
how logic is used
program to find the roots of a quardratic equation
Can static variables be declared in a header file?
Which is an example of a structural homology?