Skip to content

Instantly share code, notes, and snippets.

@batmantec
Created February 2, 2016 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save batmantec/3c0bc660c910ba72653e to your computer and use it in GitHub Desktop.
Save batmantec/3c0bc660c910ba72653e to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main (){
float num1, num2, ans;
cout << "Give me the radius value: ";
cin >> num1;
cout << "Give me the hright value: ";
cin >> num2;
ans=(3.14*(num1*num1)*num2);
cout<<"The volume of the cylinder is "<<ans<<endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment