answersLogoWhite

0


Best Answer

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();

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Sanjay Sanjay

Lvl 2
2y ago

56

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: C program to print 1 to 100 divisible by 2 and not divisible by 3 and 5?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Program for print prime all number from 1 to 100 in foxpro?

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.


Write a c program to print the 100 to 1 nos?

Write a c program to print the 100 to 1 nos


C program to print nos divisible by 8?

#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


C program to print all integers between 1 to 100 not divisible by 2 or 3?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { clrscr(); for (int i=1;i&lt;=100;i++) { if(i%2 !=0 &amp;&amp; i%3 !=0) { printf("\n Numbers that are not divisible by 2 or 3:%d \n ",i); } printf("\n"); } getch(); }


C program to generate numbers from 1 to 100 divisible by 2?

(rand()&amp;50+1)*2


What number is divisible by 87 and 100?

87 is divisible by 1, 3, 29, and 87. 100 is divisible by 1, 2, 4, 5, 10, 20, 25, 50, and 100, therefore the only number divisible by 87 and 100 is 1.


Write a program to accept any number n print the qube of all the number from 1 to n that are divisible by 3?

# Ruby code print 'Enter n: '; n = gets.to_i n.times { | i | puts ( i + 1 ) ** 2 if ( i + 1 ) % 3.0 == 0.0 }


How many numbers are between 1 and 100 are divisible by 5?

There are 98 numbers are between 1 and 100 that are divisible by five.


What numbers is divisible by 1 an 100?

Multiples of 100.


What numbers over 100 are divisible by 1?

All integers are evenly divisible by 1.


How many numbers between 1 and 100 are divisible by 2?

There are 49 numbers between 1 and 100 that are divisible by two.


Writes a c program to find the sum of all integers between 1 and n?

Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11