In: Computer Science
CODE:
OUTPUT:
RAW_CODE:
//including iostream for input and output streams
#include<iostream>
//using standard namespacing
using namespace std;
//staring of the main function
int main()
{
//integer variable i for purpose of loop
iteration
int i;
cout<<"The numbers from 0 to 99 , which are
divisible by both 2 and 5 are :"<<endl;
//for loop iterates over all integers in the range 0
to 99
for(i=0;i<=99;i++)
{
//printing the numbers those which
are dividible by both 2 and 5
//In first 0 is printed Zero is
divible by everything
//using logical and(&&)
operator it needs both statements to be true
//if one statement is false then if
condition is not executed
if(i%2==0&&i%5==0)
{
cout<<i<<ends;
}
}
//return 0 to the operating system after successful
compilation
return 0;
}
*************For any queries comment me in the comment box**************