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 |
Can we run Applet in Web browser with security policy files
For printing a message we use System.out.println in normal programs. We use String msg="text....."; Can't we use String msg=" " in normal programs and System.out.println("........") in applets. Please answer this question?
how to store and retrive a set of values without using an array
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.
we compile any program bu c:/>javac prog.java and run as c:/>java prog Here what's the meaning of c in javac. We have java Interpreter but not compiler.Then why we have to use javac. Please answer this question?
what is runtime class?
Design a program using one-dimensional array that determines the highest value among the eight input values from a user. Display the difference of each value from the highest to the lowest.
write a program in java to find the moving average of all prime numbers between 2 and 100.
write a c program which takes 20 numbers in an array as input from user and rearrange them in two different array defining even or odd
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?
Program to print map of India in java.
How to create Date method to set the date in Ms Access