# include<stdio.h> void main() { int i = 1; while(i<11) { if(i%2==1) { printf("\n%d",i); } i++; } }
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.
This would require some computer knowledge. It can make it easier to find out the prime numbers without figuring it out in your head.
Oh, what a lovely request! In FoxPro, you can create a program to print all prime numbers from 1 to 100 by using a loop to check each number for divisibility only by 1 and itself. If it meets this criteria, you can print it out on the screen. Remember, every number is unique and special, just like a happy little tree in a vast forest.
N = x If y < N then N = Y If z < N then N = z Print N
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.
Write a c program to print the 100 to 1 nos
#include
for (int i = 2; i < 10; i ++) printf("%d\n", i); You did say even and odd numbers between 1 and 10. That's allnumbers between 1 and 10.
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
echo 'print a pattern'
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
#include <iostream> int main() { for(int i=51; i <= 100; i+=2) { cout << i << endl; } return 0; }
#include<stdio.h> #include<conio.h> void main() { int i,j; for(i=51;i<100;i=i+2) { printf("%d", i); } getch(); }
# include<stdio.h> void main() { int i = 1; while(i<11) { if(i%2==1) { printf("\n%d",i); } i++; } }