Write a program that prints integers that are multiples of 5 in the range of 5 to 50. Name the program as follows: multiples_while.cpp. while loop program
#include<iostream>
using namespace std;
int main()
{
int i=5;
while(i<=50){
if(i%5==0){
cout<<i<<"\n";
}
i++;
}
cin>>i;
return 0;
}
Comments
Leave a comment