int main (void) { puts ("unique"); }
how to print "square" using for loop
For N = 1 to 10 Print 2 * N Next N
int i=0; while (i++<n) { /*...*/ }
The best way to print the numbers 1 to 100 in PHP without using a loop is with the following code: echo implode("<br>", range(1,100)); You can replace the <br> with anything that you want to separate the numbers, such as dashes. I used a line-break in the example.
for(int i=1;i<=n;i++) { for(int j=1;j<=i;j++) { print what u need } print to go to next line }
c the book mastering c
It may not be worthwhile to write a loop at all in such a simple case. On the other hand, you can make two loops, one for the ascending part, and one for the descending part. Finally, you can use a single loop, and a condition inside it: use a counter "i" = 1 to 5; if i < 4 print i, otherwise print 6 - i. This latter would be useful if, instead of simply printing the values indicated, you needed several commands within the loop; in this case, having a second loop is simply not practical.
x as int = 0 while x < 50 x = x + 1 print x endwhile
//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
var fruits = ["Banana", "Orange", "Apple", "Mango"]; var x=fruits.valueOf(); alert(x);
int youArray[arraysize] = {...};...for (int i = 1; i
cls input "enter a name"; a$ b=1 while b <=1 print a$ b = b+1 wend end