•

0 likes•2 views

Report

Share

Write a program to compute the volume V of a cylinder of radius r and height h. (Recall that V = r2h.) in c++ let r = 5 and h=12 and pi=3.14 Solution Volume of the cylinder is r 2 h PROGRAM: #include <iostream> #include <cmath> using namespace std; const float pi=3.14; /* defining the constant value of pi and later using it in the program */ int main() { int r=5,h=12; float volume; volume = pi * pow(r,2) * h; /* pow(x,y) is a function used to calculate the value of x y and here it is used to calculate r 2 */ cout<<\"\ \ Volume of the cylinder is \"<<volume; } OUTPUT: Volume of the cylinder is 942 .

Download to read offline

Ad

Write a recursive function to convert a character string of digits to.docx

Write a recursive function to convert a character string of digits to.docx

Write a query to display the customer last name and city for all custo.docx

Write a query to display the customer last name and city for all custo.docx

write a program that reads package weights and calculate the post fee.docx

write a program that reads package weights and calculate the post fee.docx

Write a program that takes an input of n and prints the numbers from 1.docx

Write a program that takes an input of n and prints the numbers from 1.docx

Write a program in assembly language that will test PIN #0 of PORTA to.docx

Write a program in assembly language that will test PIN #0 of PORTA to.docx

Write a program that uses a dynamic array that contains 5 items of dou (1).docx

Write a program that uses a dynamic array that contains 5 items of dou (1).docx

Write a program that calculates the final value of a ten year- $10-000 (1).docx

Write a program that calculates the final value of a ten year- $10-000 (1).docx

Write a program that finds the temperature- as an integer - that is th.docx

Write a program that finds the temperature- as an integer - that is th.docx

Write a python program that opens the career-txt file that is included.docx

Write a python program that opens the career-txt file that is included.docx

Write a program that contains and utilizes a function called haltNum(i.docx

Write a program that contains and utilizes a function called haltNum(i.docx

Write a program in MATLAB to implement the algorithm of Gaussian Elimi.docx

Write a program in MATLAB to implement the algorithm of Gaussian Elimi.docx

write a program to calculate the average of six number input by the us.docx

write a program to calculate the average of six number input by the us.docx

Write a program that uses the DrawingPanel to produces the following f.docx

Write a program that uses the DrawingPanel to produces the following f.docx

Write a program in assembly language 8086 not 8085 to find the number.docx

Write a program in assembly language 8086 not 8085 to find the number.docx

write a mips code which pop-ups a confirmation dialog which have yes o.docx

write a mips code which pop-ups a confirmation dialog which have yes o.docx

Write a program in (C or C++ or Java or python) to capture the center.docx

Write a program in (C or C++ or Java or python) to capture the center.docx

write a new equation of the line in slope intercept form parallel to e.docx

write a new equation of the line in slope intercept form parallel to e.docx

Write a program file_max-c that reads a set of integer numbers from a.docx

Write a program file_max-c that reads a set of integer numbers from a.docx

Write a PHP function (write the function only) to dynamically create a.docx

Write a PHP function (write the function only) to dynamically create a.docx

Write a PASCAL program to compare two integers entered from the keyboa.docx

Write a PASCAL program to compare two integers entered from the keyboa.docx

Unleashing the Power of AI Tools for Enhancing Research, International FDP on...

Unleashing the Power of AI Tools for Enhancing Research, International FDP on...Dr. Vinod Kumar Kanvaria

D.pharmacy Pharmacology 4th unit notes.pdf

D.pharmacy Pharmacology 4th unit notes.pdf

2.20.24 The March on Washington for Jobs and Freedom.pptx

2.20.24 The March on Washington for Jobs and Freedom.pptx

Data Modeling - Entity Relationship Diagrams-1.pdf

Data Modeling - Entity Relationship Diagrams-1.pdf

Appendicular SkeletonSystem PPT.....pptx

Appendicular SkeletonSystem PPT.....pptx

catch-up-friday-ARALING PNLIPUNAN SOCIAL JUSTICE AND HUMAN RIGHTS

catch-up-friday-ARALING PNLIPUNAN SOCIAL JUSTICE AND HUMAN RIGHTS

Practical Research 1: Nature of Inquiry and Research.pptx

Practical Research 1: Nature of Inquiry and Research.pptx

skeletal system details with joints and its types

skeletal system details with joints and its types

Introduction of General Pharmacology PPT.pptx

Introduction of General Pharmacology PPT.pptx

ACTIVIDAD DE CLASE No 1 - SOPA DE LETRAS

ACTIVIDAD DE CLASE No 1 - SOPA DE LETRAS

Exit Essay - Save the Filipino Language by Renz Perez.docx

Exit Essay - Save the Filipino Language by Renz Perez.docx

Chromatography-Gas chromatography-Principle

Chromatography-Gas chromatography-Principle

Unleashing the Power of AI Tools for Enhancing Research, International FDP on...

Unleashing the Power of AI Tools for Enhancing Research, International FDP on...

Intuition behind Monte Carlo Markov Chains

Intuition behind Monte Carlo Markov Chains

CONCEPTS OF ENVIRONMENT & ECOSYSTEM.pptx

CONCEPTS OF ENVIRONMENT & ECOSYSTEM.pptx

2.15.24 The Birmingham Campaign and MLK.pptx

2.15.24 The Birmingham Campaign and MLK.pptx

UNIT 1 BIOMOLECULE_CARBOHYDRATES PRESENTATION

UNIT 1 BIOMOLECULE_CARBOHYDRATES PRESENTATION

Barrow Motor Ability Test - TEST, MEASUREMENT AND EVALUATION IN PHYSICAL EDUC...

Barrow Motor Ability Test - TEST, MEASUREMENT AND EVALUATION IN PHYSICAL EDUC...

Bayesian Analysis Fundamentals with Examples

Bayesian Analysis Fundamentals with Examples

Andreas Schleicher - 20 Feb 2024 - How pop music, podcasts, and Tik Tok are i...

Andreas Schleicher - 20 Feb 2024 - How pop music, podcasts, and Tik Tok are i...

UniSC Fraser Coast library self-guided tour

UniSC Fraser Coast library self-guided tour

- 1. Write a program to compute the volume V of a cylinder of radius r and height h. (Recall that V = r2h.) in c++ let r = 5 and h=12 and pi=3.14 Solution Volume of the cylinder is r 2 h PROGRAM: #include <iostream> #include <cmath> using namespace std; const float pi=3.14; /* defining the constant value of pi and later using it in the program */ int main() { int r=5,h=12; float volume; volume = pi * pow(r,2) * h; /* pow(x,y) is a function used to calculate the value of x y and here it is used to calculate r 2 */ cout<<" Volume of the cylinder is "<<volume; } OUTPUT: Volume of the cylinder is 942