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

PLEASAE HELP ME 1. Process of adopting a new culture, either voluntarily or foced..........2. A party organization, headed by a single boss or small autocratic
Find cube root of 225. Show steps
The circumference of a circle is 43.96 kilometers. What is the circle's diameter?
Give three properties of a Solid
which one means i love the hamburgers in spanish
Need help.don’t understand
PLS HELP!!! Science Why are models used for weather forecast? A)To control weather factors like air pressure in a region B)To change the direction and str
The perimeter of the triangle is 15.7 inches, so the equation to solve is 2a + b = 15.7. Which lengths make sense for possible values of b?
explain how the values of h and k in y=|x-h|+k affect the graph of y=|x|
The beginning inventory at cost is $80,000.00 and at retail is $100,000.00. Purchases at cost are $160,000.00 and the retail value is $200,000.00. Net sales are