Mohammed Salah

Mohammed Salah @md-salah

About: Civil Engineer Like programming

Location:
saudi arabia
Joined:
Jan 15, 2025

Mohammed Salah
articles - 28 total

C++28th code (The ternary operator in C++ )

#include<iostream> using namespace std; int main() { float a,b; cout<<"...

Learn More 0 0Feb 4

C++27th code (The sum of the number and the ASCII value of the character)

#include<iostream> using namespace std; int main() { int a; char b;...

Learn More 0 0Jan 30

C++26th Code ( print the size of various data types in C++)

#include<iostream> #include<cstdint> using namespace std; int...

Learn More 0 0Jan 30

C++25th Code ( ASCII Character)

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

Learn More 0 0Jan 27

C++24th Code ( define Variable by Auto )

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

Learn More 0 0Jan 27

C++23rd Code (the memory size (in bytes) of each variable type using sizeof)

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

Learn More 0 0Jan 27

C++22nd Code--> (the memory size (in bytes) of each variable type using sizeof)

#include<iostream> using namespace std; int main() { int x ; float y ;...

Learn More 1 0Jan 26

C++21st Code(Your age by year , month,days,hrs,min,seconds)

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

Learn More 0 0Jan 26

C++20th Code (Constant by #define) -->Not prefere

#include<iostream> using namespace std; #include<iomanip> #define con...

Learn More 0 0Jan 26

C++19th Code ( postfix & Prefix) --> (X++) & (++X)

#include<iostream> using namespace std; int main() { int x = 1; ++x; cout<<" x...

Learn More 0 0Jan 25

C++18th code ( start each line with ; ) --> Not clean code

#include<iostream> using namespace std; int main() { cout<<"\n Welcome...

Learn More 0 0Jan 25

C++17th code--> [Constant (pi) & iomanpi ] with Precision (51)

#include<iostream> #include<iomanip> using namespace std; int main() { const double...

Learn More 0 0Jan 24

C++16th Code (Variables in C++)

#include<iostream> using namespace std; int main() { int a ; float b; double...

Learn More 0 0Jan 24

C++15th Code ( cerr & cout)

#include<iostream> using namespace std; int main() { cout<<"\n \t...

Learn More 0 0Jan 24

C++14th Code (Loop using for)

#include<iostream> using namespace std; int main() { double a; int b ;...

Learn More 0 0Jan 23

C++13th code (Loop using if --> Even Number )

#include<iostream> using namespace std; int main() { int i ; cout<<"...

Learn More 4 0Jan 22

C++12th code(nested if -->Max number )

#include<iostream> using namespace std; int main() { long double a,b,c,d;...

Learn More 0 0Jan 21

C++ 11th code(cmath-->abs)

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

Learn More 0 0Jan 21

C++10th code (Area of circle)

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

Learn More 0 0Jan 20

C++9th code(pointer &Memory )

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

Learn More 0 0Jan 20

C++8th code(cmath-->power exponent)

#include<iostream> #include<cmath> using namespace std; int main() { float a,b ;...

Learn More 0 0Jan 19

C++ 7th code (if-->odd&even)

#include<iostream> using namespace std; int main() {int a; cout<<" \n\n\n \t\t\t Enter...

Learn More 0 0Jan 19

C++ 6th (if Statement )

#include<iostream> using namespace std; int main() { int a; cout<<"...

Learn More 0 0Jan 19

C++ 5th code (Max of 2 Numbers)

#include<iostream> #include<cmath> int main() { float x , y ; std::cout<<" Enter...

Learn More 0 0Jan 17

C++ 4th code (The variable label in Memory )

#include<iostream> using namespace std; int main() { float n ; cout<<"\n \t \n\t...

Learn More 0 0Jan 17

C++ 3rd Code ( using cin.get alternate system("pause")

#include <iostream> using namespace std; int main() { cout<<" Hello C++ World...

Learn More 0 0Jan 17

C++ 2nd code (sum & Average) For Two Float numbers

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

Learn More 0 0Jan 16

C++ 1st code

#include <iostream> using namespace std; int main() { cout << "\n...

Learn More 0 0Jan 15