Question #322454


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


Expert's answer





#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;
}
LATEST TUTORIALS
APPROVED BY CLIENTS