📖 Samacheer Kalvi · 11th TN - English Medium · Computer Science · Page 186question

Introduction to C++ · Part 6

Chapter 3: 4 · Computer Science

Upper Case is COMPUTER SCIENCE Program . . . .

strlwr() The strlwr() function is used to convert the given string into Lowercase letters. General Form: strlwr(string) Chapter Page - - using namespace std; #include<iostream> #include<ctype.h> #include<string.h> int main() char str1[ ]; cout<<"\nType any string in Upper case :"; gets(str1); cout<<"\n Converted the Source string “<<str1<<into Lower Case is "<<strlwr(str1); Output: Type any string in Upper case : COMPUTER SCIENCE Converted the Source string COMPUTER SCIENCE into lower Case is computer science Program . . .

Mathematical functions (math.h) Most of the mathematical functions are defined in math.h header file which includes basic mathematical functions. . . .

cos() function The cos() function takes a single argument in radians. The cos() function returns the value in the range of [- , ]. The returned value is either in double, float, or long double. #include <iostream> #include <math.h> using namespace std; int main() double x = .

, result; result = cos(x); cout << "COS("<<x<<")= "<<result; Output: COS( . )= .877583 Program . . .

. sqrt() function The sqrt() function returns the square root of the given value. The sqrt() function takes a single non-negative argument. If a negative value is passed as an argument to sqrt() function, a domain error occurs .

Chapter Page - - #include <iostream> #include <math.h> using namespace std; int main() double x = , result; result = sqrt(x); cout << "sqrt("<<x<<") = "<<result; return ; Output: sqrt( ) = Program . . . .

sin() function The sin() function takes a single argument in radians. The sin() function returns the value in the range of [- , ]. The returned value is either in double, float, or long double. .

. . pow() function The pow() function returns base raised to the power of an exponent. If any argument passed to pow() is long double, the return type is promoted to long double.

If not, the return type is double. The pow() function takes two arguments: • base - the base value • exponent - exponent of the base #include <iostream> #include <math.h> using namespace std; int main () double base, exponent, result;

Related topics

Have a question about this topic?

Get an AI answer grounded in your actual textbook — with the exact page reference.

Ask AI about this topic →