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

Find mUW please help!!!
Carbohydrates that have calories, but are low in nutrients are called what
Two stones of equal masses are dropped from a rooftop of height h one after the other . their seperation distance against time will:______
WILL GIVE BRAINLIEST IF ANSWERED QUICK!! I GIVE GOOD RATINGS FOR GOOD ANSWERS!
You borrow $12 from a friend and pay back $8. To help you understand your finances, evaluate the following expression: -12+8
critically evaluate the benefits of online petitioning so that the local government can take urgent action regarding service delivery
expand and simplify x(4x-2)+x(5x+6)
(6x-1) (6x-1) -x + 3 (x+5) - 7x(x)
The 4th and 3rd terms. of two GoP₂ (A and B) are 36 and 54 respectively. The ratio of the first team of A to that of B is Find : (i) the value of a 2a 3a. (i) t
how to find density of mixture ​