c++-beginner

begin of code:

#include <iostream> 
using namespace std;
int main(){

input

int a, b;

cin>>a>>b;

output

cout<<a<<b;

newline when print

cout << a <<endl;

Conditional

== equal
!= not equal
<=
>=
<
>
int points=101;
if(points>70){
cout << "hoy yah";
}
else if(points==70){
cout<<"konoriki";
}
else{
cout << "moko";
}

int choice=2
switch(choice){
case 1:
cout<< "bud";
break;
case 2:
cout<<"choco";
break;
default:
cout << "yoyo";
}


Comments

Popular posts from this blog

Programming- AI, machine learning

Programming -- JS, C, C++, Python

links - Robotic