Find the perimeter of a cylinder | CPP program to find perimeter of cylinder ; Function to calculate perimeter ; Driver function
#include <iostream> NEW_LINE using namespace std ; int perimeter ( int diameter , int height ) { return 2 * ( diameter + height ) ; } int main ( ) { int diameter = 5 ; int height = 10 ; cout << " Perimeter ▁ = ▁ " ; cout << perimeter ( diameter , height ) ; cout << " ▁ units STRNEWLINE " ; return 0 ; }