Solve of URI 1011 (Sphere) in C & C++
Problem Description of URI Online Judge 1011:
Problem number: 1011.Problem name: Sphere.Problem level: 2.Problem category: Beginner.Points: 2.2 pointsBase time limit: 1 second.Memory limit: 200 MB.Problem subject: Sequential.Problem adapted by: Neilor Tonin (Brazil).Link: https://www.urionlinejudge.com.br/judge/en/problems/view/1011Solution language: C & C++My profile: https://www.urionlinejudge.com.br/judge/en/profile/38770
Problem name: Sphere.
Problem level: 2.
Problem category: Beginner.
Points: 2.2 points
Base time limit: 1 second.
Memory limit: 200 MB.
Problem subject: Sequential.
Problem adapted by: Neilor Tonin (Brazil).
Link: https://www.urionlinejudge.com.br/judge/en/problems/view/1011
Solution language: C & C++
My profile: https://www.urionlinejudge.com.br/judge/en/profile/38770
Solution of URI 1011 in C:
//This solution is made & uploaded by Mehedi Hasan Kajol
#include<stdio.h>
int main(void){
double radius, volume, PI=3.14159;
scanf(" %lf ", &radius);
volume = PI * radius * radius * radius * (4/3.0);.
printf("VOLUME = %.3lf\n", volume);
return 0;
}
Solution of URI 1011 in C++:
//This solution is made & uploaded by Mehedi Hasan Kajol
#include<iostream>
using namespace std;
int main(void){
double radius, volume, PI = 3.14159;
cin >> radius;
volume = PI * radius * radius * radius * (4/3.0);
printf("VOLUME = %.3lf\n", volume);
return 0;
}