Docsity

C++ Programming: Calculating Circle Area and Output Using Increment Operators, Lecture notes of Computer Programming

Toggle sidebar
bg1
1. Using C++, write a program to calculate the Value of a Circle Area
2. Using increment operators and C++, write a program to print our on
the screen:
The initial value of count is 0.
count is now 1.
count is now 3.
3. Read following program and find out the output.
#inlude <iostream>
using std::cout;
int main( )
{
double a=5.3, b=4.0, product1;
int product2;
product1 = a * b;
product2 = (int) (a*b);
product1 = (int) a * b;
cout << “product1=“ << product1 << endl;
cout << “product2=“ << product2 << endl;
return(0);
}

Partial preview of the text

Download C++ Programming: Calculating Circle Area and Output Using Increment Operators and more Lecture notes Computer Programming in PDF only on Docsity!

  1. Using C++, write a program to calculate the Value of a Circle Area
  2. Using increment operators and C++, write a program to print our on the screen: The initial value of count is 0. count is now 1. count is now 3.
  3. Read following program and find out the output. #inlude using std::cout; int main( ) { double a=5.3, b=4.0, product1; int product2; product1 = a * b; product2 = (int) (a*b); product1 = (int) a * b; cout << “product1=“ << product1 << endl; cout << “product2=“ << product2 << endl; return(0); }