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

Scientific argumentation makes scientific results. A) stronger. B) invalid . C) permanent. D) biased
If the volume of a sphere is 36π cubic units, what is the radius?
HELP PLZZZZ 1.Find the volume of the shipping box using the two methods and show your work: Packing cubes
what is a test varible
How did the political and religious ideas of the Byzantine Empire compare with the Western Empire? (A) The Byzantine emperor was considered to be the highest p
What part of speech is the underlined word? I will never marry a rich man. (Rich is the underlined word.)
Todd wants to make a cheesecake for a birthday party. The recipe calls for a 9-inch diameter round pan. Todd only has square pans. He has an 8-inch square pan,
If a1=47 and d=-5 find a12
1. What is the solution of n² – 49 = 0? (1 point) –7 7 ±7 no solution 2. What is the solution of x² + 64 = 0? (1 point) –5 8 ±8 no solution 3. What is t
Differentiate sinx cosx