Answer to Question #312605 in C++ for Asmitk

Question #312605

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


1
Expert's answer
2022-03-16T10:23:37-0400
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment