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 difference between #include<stdio.h> and #include "stdio.h" ?
Define and explain about ! Operator?
Is struct oop?
What are the different pointer models in c?
What is meant by inheritance?
Explain how do you generate random numbers in c?
Write a program which calculate sum of several number and input it into an array. Then, the sum of all the number in the array is calculated.
Write a program to print "hello world" without using a semicolon?
#include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); } what is the output for this?
What are the 4 types of programming language?
Print all the palindrome numbers.If a number is not palindrome make it one by attaching the reverse to it. eg:123 output:123321 (or) 12321
what is const volatile?