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";
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
Post a Comment