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
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
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
Math,
1 month ago
Psychology,
1 month ago
Math,
2 months ago
Math,
2 months ago
Social Sciences,
10 months ago
Math,
10 months ago
Math,
10 months ago