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

How much can someone who weighs 110 pounds drink before they get drunk?
A cable company uses the function f(h)=30h+60 to calculate the total repair bill, f(h), for h number of hours worked. Find h if f(h)=150
The weekly sale S (in thousands of units) for the t^th week after the introduction of the product in the market is given by S=(120t)/(t2+100). In which week wou
Which revision effectively corrects the faulty parallelism in this sentence ? the novel is about a woman who is young ,poor ,and works hard
Henry paid for his lunch and wrote this equation to show the change he got back from the cashier. 20 – l = 14.5 Which situation could be described by th
-4 + -7 (-2) =? Minus equations always give me trouble :/
which thunderstorms hazard caused more than 450 deaths in Florida between 1959 and 2013
Ch 30 listening quiz mozart: eine kleine nachtmusik, i and iii this movement is set in _____ form.
Which of the following values of u makes u(2 + u) – 2u = 16 true?
How can you best promote growth food in your community?