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 |
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?
what is runtime class?
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.
does anyone know the code to display a triangle using a applet?
is public static void main() work in java?is "String arg[]" needed as argument?
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?
Can we run Applet in Web browser with security policy files
inner join,outerjoin,trigger,stored procedure explain with code snippets?
1+(2*3)+(4*5*6)+(7*8*9*10)+... specified input value
write a program in java to find the moving average of all prime numbers between 2 and 100.
write a program that inputs two real numbers then exchanges their values.