C++ Programming Language (Console)
by EN. Michael Bidollahkhany
Part 2
Purposes :
1- The Chart of Variants
2- Some assignments
3- Mathematical Tips
4- Using 'If' Statement
5- First exam (EXAM 1)
1- The Chart of Variants
In C++, We can identify a Variant(Some memory rooms! ,which We can save our information in them), like:(type) (name) ;
or
(type) (name) = (value);
3- Mathematical Tips:
if ( value == 1 ) { }
4- Using 'If' Statement
' if ' sentence We'll use it when we want to make some terms, for example: If ( number == 1 ) ...This is how we can write ' If ' statement.
if ( grade >= 60 )
cout << "Passed";
else
cout << "Failed";
OR
cout << ( grade >= 60 ? "Passed" : "Failed" );
6- You First Exam (EXAM 1)
6-1- Write a program that say 'hello' and beep(alert).6-2- a program can take a number and show that.
6-3- a program can take two number and show the sum of them.
6-4- a program take two number and show which one is bigger than other.
6-5- a program take a number and show is that odd or not.
Have a Good Time
No comments:
Post a Comment