Hello I am a beginner and I need help with my code.
The purpose of this program shall be like this:
The screen shall write "What is " followed by the question0. That answer shall be stored in the variable answer. Then the program shall write again on the screen "What is " followed by the question1 and so on. And that shall be stored in the variable answer. When all the questions have been asked the program shall summarize all the points and write how much you scored.
The problem that I have got now, is how to get N working. So the question loop will work.
Code:#include <iostream> using namespace std; int N; char question [] = "What is "; char fraga0[] = "question0"; char fraga1[] = "question1"; char fraga2 [] = "question2"; int main () { for ( N=0 ; N<5 ; N++ ) { cout << question << fragaN << "\n"; cin >> anwser; } return 0; }



LinkBack URL
About LinkBacks


