take input n chodo
//program to find the factorial value f any number using while loop #include<stdio.h> void main() { int i,n,fact=1; printf("Enter the number\n"); scanf("%d",&n); i=n; while (i>=1) { fact=fact*i; i--; } printf("The factorial value=%d",fact); } the above is a program for calculating tha factorial value of any number which is entered by the user
You can use a PL/SQL block to display numbers from 1 to n in Oracle. Here's an example program: DECLARE n NUMBER := 10; -- Change this value to your desired n BEGIN FOR i IN 1..n LOOP DBMS_OUTPUT.PUT_LINE(i); END LOOP; END; / This code declares a variable n, then uses a FOR loop to iterate from 1 to n, printing each number using DBMS_OUTPUT.PUT_LINE. Make sure to enable output in your SQL environment to see the results.
yes
Wr
In GE BASIC, you can print odd numbers using a FOR-NEXT loop by specifying a starting point and incrementing by 2. Here’s a simple example: FOR I = 1 TO 99 STEP 2 PRINT I NEXT I This will print all odd numbers from 1 to 99. The STEP 2 ensures the loop only increments by 2, thereby producing only odd numbers.
Not used
Poor Boy. We do not do your homework here.
Exactly what do you mean by 'C program in Java'
A = 5do{statement;A = A + 1;} while (A < 10)
#includeint main(){int i;for(i=2;i
Using while loop, write a program which calculates the product of digits from 1 to 5 and also show these no's vertically.
There are three ways out of a loop.1. Satisfy the loop ending condition2. Execute a break statement3. Terminate the programPerhaps you are not changing the value of the variable that is used in the loop ending condition. Perhaps you are using a variable, such as an unsigned int, decrementing it, and expecting it to go negative. Suggest you run the program in a debuger and step through the loop.