Computer Science, asked by makashdhoni2003, 2 months ago

Write and execute a C program to generate numbers between 1 and 100 which are divisible by 2 and are not divisible by 3 and 5

Answers

Answered by pranjalkushwaha297
0

Answer:

include<studio.h>

#include<conio.h>

main( )

{

int i;/*looping variable

for (i=1;i<=100;i++)/*goes from 1to100*/

{

if ((i%2==0)&&(i%3!=0)&&(i%5!=0))/*check all three condition*/

{

printf("%d",i);/*note the space after 'd'*/

}

}

printf("\nEnd of program");/*End*/

getcha( ) ;

}

Explanation:

please mark me as brainliest ans

Answered by hnagar857
1

Explanation:

include <studio. h>

#include < conio. h>

main()

{

int i;/* looping variable */

for (i=1;<=100;i++)/* goes from 1 to 100*/

{

if ((i%2==0)&&(i%3! =0)&&

(1%5!=0))/* cheks all three conditions */

{

printf("\ n End of program); /*End */

getch();

}

please Mark as brienlist

Similar questions