Manual # 1
Manual # 1
Topic:
Use of Formula`s in C++
Subject:
Introduction to Computing
Author:
Engr. Ali Faisal Murtaza
---------------------------------------------------------------------------------
Q#1: Write a program, which will display your name.
---------------------------------------------------------------------------------
Q # 2: Execute the following formula`s in C++:
For Formula below, you have to include the header file: math.h (#include<math.h>)
Absolute: cout<<abs(-8)<<”\n” ;means that it will give modulus of value given i.e. +ive
value
Exponent: cout<<exp(6)<<”\n”;
Power: cout<<pow(2,9)<<"\n"; means that 2 raise to power 9 i.e. 2^9.
Square Root: cout<<sqrt(16)<<”\n”;