write a program that will ask the user to enter a number n and
display the product of all numbers from 1 to n.
Answer / anubhavtiwari87
#include<stdio.h>
#include<conio.h>
void main()
{
int n,result;
result=1;
clrscr();
printf("enter the number");
scanf("%d",&n);
for(int i=n;i>=1;i--)
{
result=result*i;
}
printf("the desired result = %d",result);
}
| Is This Answer Correct ? | 8 Yes | 10 No |
write a program in java to find the moving average of all prime numbers between 2 and 100.
How can we get the details for printing the employee details at run time using JDBC connectivity? can u provide the coding for that? Its urgent?
what is runtime class?
is public static void main() work in java?is "String arg[]" needed as argument?
how to store and retrive a set of values without using an array
Why the program getting error if we don't use String args[] in main(), even in the case of not getting any arguments from command line?
How to create Date method to set the date in Ms Access
how to create a (*)pyramid using java codes???
write a java program to create a Frame with three scrolls, change the back ground color of the frame using functions with values of scrolls.
Write a java program to display multiplication table in a Frame.
Why we r using String args[] in main() even though v r not passing any arguments in command line?
Is it possible to define marker interface in java.If possible then how to define user defined marker interface?