Answer to Question #29504 in C++ for Chake
write c++ program that selects and displays the first 20 integer numbers that are evenly divisible by 3.
1
2013-04-30T08:48:34-0400
#include<iostream>
int main(){
int num = 0;
int i = 0;
while (num<20){
if (i%3==0){
std::cout<<i<<"\n";
num++;
}
i++;
}
getchar();
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment