0

How do i not have 0 in the output

You are given a program that outputs all the numbers from 0 to 20. Change the code to make it output only numbers that are multiples of 3.

13th Oct 2020, 5:15 PM
Frost
Frost - avatar
2 odpowiedzi
+ 1
No idea what you are talking about!
13th Oct 2020, 5:20 PM
Abhay
Abhay - avatar
- 1
You can use if inside the for loop to display only number divisible by 3 for(int i =0;i<=20;i++) if(i%3 == 0) cout<<i<<"\n";
13th Oct 2020, 5:38 PM
HBhZ_C
HBhZ_C - avatar