Sammy288
Sammy288 Sammy288
  • 15-06-2022
  • Computers and Technology
contestada

Write a for loop that displays the following numbers exactly like this (you must use a loop):

3 7 11 15 19

Hint: notice the pattern of the numbers

Respuesta :

philjackson11 philjackson11
  • 15-06-2022

Answer:

while (true)

{

   print(3);

  print(7);

 print(11);

print(15);

print(19)

break;

}

Explanation:

Answer Link
rdacoder
rdacoder rdacoder
  • 15-06-2022

Answer:

I will use c++ for this...

#include <iostream>

using namespace std;

int main() {

 int num = 0;

 int curr = 0;

 for (int i = 0; i<5; i++) {

   num = 3 + curr;

   cout << num << " ";

   curr += 4;

 }

}

Answer Link

Otras preguntas

PLEASE TELL THE ANSWER I DONT KNOW. I HAVE TO GET THIS ONE QUESTION RIGHT
Paul adore le basket. llest_____________.lnès et lsabelle adorent lire et étudier. Elles sont_____________.Les élèves ne sont pas mauvais. lls sont____________.
how to convert 8.3 micrometers to meters
please help 6s - 10 = 10 what is s? ( 6 x ___ )
What is the whole number quotient and reminder for 32÷6
A 1500 kg car is parked at the top of a hill 5.2 m high. What is the velocity of the car, in meters per second, when it reaches the bottom of the hill?
Where was Georgia's 4th capital?
I REALLY NEED HELP ON THIS PLS HELP
Plz answer asap!! Ela
Use the figure below to answer the question below. A. If each square represent one square unit, estimate the area of the shaded figure in square units. B. Estim