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

Anjali wanted to eat chick pea (Kontaikkatalai). She requested her mother to cook the same on next day. At night her mother took a cup of chick pea and put them
evolution by natural selection is an example of a scientific
Ngân hàng thương mại có tỷ lệ an toàn vốn tối thiểu là 8% và tỷ suất sinh lời trên tài sản có hằng năm như sau : năm 1998 có ROA là 14.3% , năm 1999 có ROA là 1
Does this graph represent a function (scatter) A. Yes B. No
You are a student in Danang city. You will describe your neighborhood for new students. You should say: 1/ Where to buy food 2/ Where to buy furniture 3/ Wher
Difference between temporary and permanent methods of contraception​
[10pts] make u the brainliest if u want (BUT only for correct answers
What is the answer to 5/8 - 1/4^2
Simplify the expression 2x(4 + x - 9 + 3x) A. 8x - 10 B. -2x² C. -10x² D. 8x² - 10 E. 8x² - 10x
Angelique travels 75 miles. Jamila travels 115 kilometres. Show that Angelique has travelled futher than Jamila.