diamondsdiplomat diamondsdiplomat
  • 30-10-2021
  • Engineering
contestada

Basic C++ For Loop I'm trying to learn. Replit tells me that the for in the forloop is an error, but I don't know what's wrong. Can anyone help?

Basic C For Loop Im trying to learn Replit tells me that the for in the forloop is an error but I dont know whats wrong Can anyone help class=

Respuesta :

sqdancefan
sqdancefan sqdancefan
  • 31-10-2021

Answer:

  curly brackets are missing

Explanation:

The body of the main() function need to be enclosed in curly brackets. Try this:

int P = 3000;

int main( ) {

  for (int t = 0; t < 10; t++) {

     cout << P;

  }

}

Answer Link

Otras preguntas

A resolution is _____
help please it’d be greatly appreciated lol
Write a polynomial function P(x) with rational coefficients so that P(x) = 0 has the given roots. 2+√2i, 4+i
This painting is of King Louis XIV as shown in Sugar Changed the World. How does this image support the claim that monarchs of the 1700s had wealth and influ
What is the experimental probability as a decimal
In oratorio, the story is carried forward by theA. arias.B. chorus.C. narrator’s recitatives.D. duets.
How are cellular respiration and photosynthesis related?
20 POINTS Which property or postulate justified the statement below? "If WX=YZ, then WX+RS=YZ+RS" A. Transitive Property of Equality B. Addition Property of Equ
A marble sculpture has been repaired and is ready for display. Which two specialists might work together to create written information tags for the display?
What freedoms did the Northwest Ordinance guarantee? A: Freedom of religion, speech and trial by jury B: Freedom by the press, religion and the freedom to own s