Select language
Română
English
Français
Deutsch
Italiano
Español
Home
Languages ▾
CPP
C
CS
GO
JAVA
Python
Html
JS
CSS
PHP
Hard Lessons ▾
Hard Lesson 1
Hard Lesson 2
Hard Lesson 3
Hard Lesson 4
Hard Lesson 5
Hard Lesson 6
Hard Lesson 7
Hard Lesson 8
Hard Lesson 9
Hard Lesson 10
Hard Lesson 11
Hard Lesson 12
Compiler
Account
CPP
Example
#include
using namespace std; int main() { int n; cin>>n; cout<<"Input:"<
Variables
- int - EX:100 - Size: 4 bytes - float - EX:5.67 - Size: 4 bytes - double - EX:5.678 - Size: 8 bytes - char - EX:'A' - Size: 1 byte - string - EX:"Hello" - Size: 24 bytes - bool - EX:true/false - Size: 1 byte - void - EX:void function - Size:0bytes - long - EX:1000000 - Size: 8 bytes - short - EX:100 - Size: 2 bytes
Input
int number; cin>>number; cout<<"Number:"<
>character; cout<<"Character:"<
Output
cout<<"text"; cout<
Comments
// This is a basic comment. ////... This is also a basic comment Basic comments only comment the line they are placed on from // to the end. /* This is a comment for an entire code sequence. This code is NOT executed. */
Functions
Can be of all the types specified above (int,float,void,..) int Hello(int x,float y) { //code.. retrun
} In this case: -int: Return type -Hello: Function name -int x and float y: parameters Void functions don't return any value!