//to display 'n' natural numbers using for loop......(in C).....
#include<stdio.h>
main()
{
int n,i;
printf("\n Enter the range......Please...\t");
scanf("%d",&n);
printf("\n Range of Natural Numbers.....\t");
for(i=1;i<=n;i++)
{
printf("\t%d",i);
}
}
#include<stdio.h> #include<conio.h> void main() { int n,p=1,i; //p is foe multiplication print("enter how many no u want to enter"); scanf("%d",&n); for(i=1;i<=n;i++) { printf("enter no"); scanf("%d",&no); p=p*no; } printf("product of n no=%d",p); getch(); }
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
#include
you do this 10 print "0112358132134" use the whole of the thing
echo 'print a pattern'
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
You can use int i; for (i = 10; i <= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.
#include
Prime numbers are numbers that are only divisible by themselves and the number 1. You can write a program to print all prime numbers from 1 to 100 in FoxPro.
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
you do this 10 print "0112358132134" use the whole of the thing
write a program to print A to Z on screen in c?
Try the triangle program on a search engine. Replace numbers with stars and that should do the trick
Write a c program to print the 100 to 1 nos
echo 'print a pattern'
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
Add the numbers into one variable as you read them in. But if you prefer, you can read the numbers into an array and then use a loop to add the numbers together.