+ 1
C++ I am try to get it to output every number divisible by 3 up to 20.
#include <iostream> using namespace std; int main() { //change the code int num = 3; while(num<=20){ cout<<num<<endl; num*=3; } return 0; }
4 Respostas
+ 3
Try num+=3 instead of num*=3
+ 2
Oh wow it was that easy lol