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

Associer chaque équation inéquation a sa représentation graphique
who was the resident of usa in1983
i almost give you the same experience as time travel what am i
factorize 2x^4-x^3-6x^2+7x-2
Which of the following is a true statement? 7/16>5/10, 5/16<8/24, 4/5<6/16,5/8<6/16
fill in the blanks with suitable prepositions to complete the para given below
limestone or marble is extremely vulnerable to corrosion by acid deposition. A. true B. false
pleasa give me the answer thank you very much !! use English tqqqqq​
Santos deposited $1,800 in an account that yields 2.1% interest, compounded semi-annually. How much is in the account after 54 months? Round to the nearest cent
Prepare an art integrated assignment (Chart tabulation of music, costume, region, language association) of haryana