(finding numbers divisible by 5 and 6 using loops in C++) write a program that displays, ten numbers per line, all the numbers from 100 to 1000 that are divisible by 5 and 6.
1
Expert's answer
2012-08-31T08:09:58-0400
#include <iostream> using namespace std;
int main(){ int k = 0; for (int i = 100 ; i < 1000 ; i++){ & if ((i%5 == 0) && (i%6 == 0)) { & k++; & & cout<<i<<' ';
Comments
Leave a comment