jamomoja88 jamomoja88
  • 02-01-2022
  • Computers and Technology
contestada

What is the C++ program to display 3 6 9 12 15​

Respuesta :

YBS20
YBS20 YBS20
  • 02-01-2022

Answer:

#include <iostream>

using namespace std;

int main()

{

   

   int n = 15;

   

   for(int i=3; i<=n; i=i+3){

       cout<<i;

       cout<<" ";

   }

   return 0;

}

Explanation:

Used for loop to calculate number and display it. for start with 3(int i=3), increment by 3(i=i+3) and stop when 15 came (i<=n where n is 15).

Answer Link

Otras preguntas

Is it boy or boi? I prefer boi but I don't know
If Marie makes an investment of $8,000 that earns 2% simple interest annually how much is the total investment what after 3.5 years ?
5 / 4 x + 3 = x - 1 / 4
Simplify the expression: 2/3 divided by -4 minus (1/6 - 8/6)​
PLEASE HELPPPP Can the following be assumed from a diagram? Perpendicular lines and right angles
Write the repeating decimal 0.63333 as afraction
For the following problem, match the name of the number property that was used to get to each step from the previous step.
What is the degree of the polynomial? f(x) = 4x^3 + 5x^5 - 2x^4 - 3 + 2x
What technologies did paleolithic people develop survive?
Read the Sentence Fundamentals page in the modules. Then, rewrite these sentences correctly. This assignment will close on Friday at midnight. ts 1. Human hair