Popular Posts

15.Write a program and find the value which are divisible by 5 or 2 .

15.Write a program and find the value which are divisible by 5 or 2 .

#include
#include
int main()
{
clrscr();
int i;
for(i=100;i<=150;i++)
if(i%5==0||i%2==0)
cout< getch();
return 0;
}

Output:

100 102 104 105 106 108 110 112 114 115 116 118 120 122 124 125 126 128 130 132 134 135 136 138 140 142 144 145 146 148 150

No comments: