Question #312605

Write a c++ program using while loop to display all the multiples of 5 from 100 to 50


Expert's answer

#include <iostream>
using namespace std;




int main()
{


	int counter=100;


	while(counter>=50){
		if(counter%5==0){
			cout<<counter<<" ";
		}
		counter--;
	}
	cout<<"\n\n";


	system("pause");


	return 0;
}
LATEST TUTORIALS
APPROVED BY CLIENTS