| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Write a program to calculate area of a circle using functions.
area = (atan(1) * 4) * (pow(radius, 2));
GET the PI value
atan(1) = PI/4 * 4 = PI
Pow
Use pow function to exponentiation.
Write a program to swap two values using functions.
Write a program to convert time to minutes using functions. (input 3 variables namely hours, minutes and seconds. Convert everything into minutes.)
Cin.fail Cin.clear Cin.ignore
We can use this cin function to judge the user input's correctless. If cin.fail is 1, maybe our input type is wrong with the store variable type.
cin.clear(); // Clear the error state
cin.ignore(std::numeric_limitsstd::streamsize::max(), '\n');//clear all input in the string buffer
Write a program to sum the series up to n (Input n)
| Back | FazBrowse Home | New Git URL |