#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
for (int i=1;i<=100;i++)
{
if(i%2 !=0 && i%3 !=0)
{
printf("\n Numbers that are not divisible by 2 or 3:%d \n ",i);
}
printf("\n");
}
getch();
}
10 CLS: PRINT "I shall now amaze the audience by printing " 20 PRINT "the four smallest perfect square integers." 30 for N = 1 to 4 : PRINT N, N^2 : NEXT N 40 PRINT: PRINT "Thank you." 50 PRINT "You've been a wonderful audience." 60 PRINT "I'm here until Friday." 70 PRINT "Don't forget to tip your waiter."
include<stdio.h> #include<conio.h> main() { int i; /* looping variable */ for(i=1;i<=100;i++) /* goes from 1 to 100 */ { if((i % 2 == 0) && (i % 3 != 0) && (i % 5 != 0)) /* checks all three conditions */ { printf("%d ",i); /* note the space after 'd' */ } } printf("\nEnd of Program"); /* End */ getch(); }
For N = 2 to 30 STEP 2 Sum = Sum + N Next N Print "The sum is "; Sum; ". Have a nice day. Come back and see us." END
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.
There is a computer program that will print out the value of pi to even more decimal places than that.
cls input "enter a no"; num if num mod 14= num then print "no is divisible" else print "not divisible" end if end
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 #include#define N 100 /* change the upper limit by changing value of N */int main(){int i;clrscr();printf("\nPROGRAM TO PRINT NUMBERS DIVISIBLE BY 8 between 1 and 100\n");for(i=1;i
Algorithm: multiples input: two positive integers, m and n output: print first n multiples of m i = m; for j = 1 to n print i i = i + m; next j
wap to print all the arnstrong no. between 100&1000
Reference:http:cprogramming-bd.com/c_page2.aspx# strange number
echo 'print a pattern'
10 CLS: PRINT "I shall now amaze the audience by printing " 20 PRINT "the four smallest perfect square integers." 30 for N = 1 to 4 : PRINT N, N^2 : NEXT N 40 PRINT: PRINT "Thank you." 50 PRINT "You've been a wonderful audience." 60 PRINT "I'm here until Friday." 70 PRINT "Don't forget to tip your waiter."
Write a c program to print the 100 to 1 nos
include<stdio.h> #include<conio.h> main() { int i; /* looping variable */ for(i=1;i<=100;i++) /* goes from 1 to 100 */ { if((i % 2 == 0) && (i % 3 != 0) && (i % 5 != 0)) /* checks all three conditions */ { printf("%d ",i); /* note the space after 'd' */ } } printf("\nEnd of Program"); /* End */ getch(); }
write a program to print A to Z on screen in c?
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.