Skip to content

Beginner Manual to switch from coding with python to coding with C++

Notifications You must be signed in to change notification settings

KhaledGhonem724/PythonToCpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

PythonToCpp

main function

#include <iostream>
using namespace std;
int main() 
{
cout<< "hello, world!" <<endl;	
}
print("hello, world!")

variables

int a=5;
double b=2.234;
bool c=true;
string d="icpc pharos";
a=5
b=2.234
c=True
d="icpc pharos"

input , output & comment

cout<< "this ic the first line" << endl; 
cout<< "Hello, " << name << " : ";
cout<< "welcome to icpc pharos community !" << endl;
// this is a comment
int n;
cin>>n;
print("this ic the first line")
print("Hello, " + name + " : " , end="")
print("welcome to icpc pharos community !")
# this is a comment
n=int(input())

if condition

if (condition1){
// code 1
}else if (condition2) {
// code 2
} else{
// code 3
}
if condition1:
  # code
elif condition2:
  # code
else:
  # code

loops

About

Beginner Manual to switch from coding with python to coding with C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published