0
Why doesnt this work?!
Code: #include <iostream> using namespace std; int = 1 cout<<int<<endl;
8 Respuestas
+ 4
void main(){
int num =1;
cout<<num<<endl;}
+ 2
you have place a variable before equality......(such as int x=1;) then cout<<x<<endl;
+ 1
try int number = 1. A variable needs a type a name. you can declear a value later.
+ 1
put it in the main()
0
Ima confused
0
print number and not int i.e. cout<<number<<endl; and try placing it inside a main()
0
See the course part about variable declaration and how to use variables in statements. Now you're on the wrong way.
- 2
Im getting a new error
Code:
#include <iostream>
using namespace std;
int number = 1
cout<<int<<endl;
^ here