using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace printnumber
{
class Program
{
static void Main(string[] args)
{
int i;
for (i = 0; i < 20; i++)
{
Console.Write(i);
Console.Read();
}
}
}
}
Oh, dude, to print those numbers in QBasic, you can use a simple loop. Just loop from 1 to 5 and print the numbers with spaces in between. It's like making a sandwich, but with numbers instead of bread and cheese. So, like, don't stress, just code it up and hit run. Easy peasy, right?
11
it is int n=123; printf ("%d", (n/10)%10);
num%=9 CLS PRINT "The square of: "; num%; " = "; num%*num% END
10
For N = 1 to 10 Print 2 * N Next N
//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
Oh, dude, to print those numbers in QBasic, you can use a simple loop. Just loop from 1 to 5 and print the numbers with spaces in between. It's like making a sandwich, but with numbers instead of bread and cheese. So, like, don't stress, just code it up and hit run. Easy peasy, right?
Declare num number(10):=&num; a number(10); counter number:=1; begin for i in 1..10 LOOP a:=num*counter; DBMs_output.put_line(a); Counter:=counter+1; end loop; end;
11
10 CLS 20 FOR n = 1 to 10 30 PRINT n, n^2, n^3 40 NEXT n 50 PRINT: PRINT: PRINT "Touch 'x' to go again, any other key to end." 60 INPUT a$ 70 IF a$ = "X" or a$ = "x" THEN 10 80 END
Using for loop we can find sum of digits of a number. Inside the loop just perform Logic Expression 1) rem=num%10. {To find the unit place no. using remainder functon} 2) sum = sum+rem {to find the addition ie output} 3) num=num/10 {to eliminate the added digit} Just repeat these steps in the loop.
it is int n=123; printf ("%d", (n/10)%10);
cls input "enter a name"; a$ b=1 while b <=1 print a$ b = b+1 wend end
num%=9 CLS PRINT "The square of: "; num%; " = "; num%*num% END
Making an infinite loop on everybody's edits is quite simple if you are familiar with computer software. The basic code to make the loop is " 10 PRINT "SPAM" 20 GOTO 10."
10