60 617
Assignments Done
97,8%
Successfully Done
In April 2018

Answer to Question #29504 in C++ for Chake

Question #29504
write c++ program that selects and displays the first 20 integer numbers that are evenly divisible by 3.
Expert's answer
#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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions