C++ program to calculate the diagonal of cube


 #include<iostream.h>

#include<conio.h>

#include<math.h>

int main()

{

int a;

float r;

cout<<"enter the a:";

cin>>a;

r=pow(3,0.5)*a;

cout<<"Diagonal is:"<<r;

getch();

return 0;

}

To Run:

















Output:



No comments:

Post a Comment

theengineerschoice01@gmail.com