Write a c++ program using while loop to display all the multiples of 5 from 100 to 50
#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;
}
Comments
Leave a comment