URI Online Judge Solution 1011 Sphere – URI 1011 Solution in C, C++, Java, Python and C#

URI Online Judge Solution 1011 Sphere | Beginner
URI Problem Link – https://www.urionlinejudge.com.br/judge/en/problems/view/1011

Problem Name: 1011 Sphere solution
Problem Number : URI – 1011 Sphere code
Online Judge : URI Online Judge Solution
Category: Beginner
Solution Language : C,C plus plus, java, python, c#(c sharp)

URI Solution 1011 Sphere Code / URI 1011 solution in C:

URI 1011 as easy as possible:
#include <stdio.h>
#include <math.h>

int
main()
{

int
a;

scanf("%i", &a);
printf("VOLUME = %.3lfn", (4 * 3.14159 * pow(a, 3)) / 3);

return
0;
}
URI 1011 Using Nice coding:
#include <stdio.h>
#include <math.h>
#define pi 3.14159
int main ()
{

float
r;
while
(scanf("%f",&r) != EOF)
{

printf("VOLUME = %.3fn",(4/3.0)*pi*(r*r*r));

}

return
0;

}

URI Solution 1011 Sphere Code / URI 1011 Sphere solution in CPP:

#include <cstdio>
#include <cmath>

int
main()
{

int
a;

scanf("%i", &a);
printf("VOLUME = %.3lfn", (4 * 3.14159 * pow(a, 3)) / 3);

return
0;
}

URI Solution 1011 Sphere Code / URI 1011 Sphere solution in Java:

import java.util.Scanner;


public class
Main {

public static
void main(String[] args) {

double
a;
Scanner sc = new Scanner(System.in);
a = sc.nextDouble();

System.out.printf("VOLUME = %.3fn", (4 * 3.14159 * Math.pow(a, 3.0)) / 3);


}

}

URI Solution 1011 Sphere Code / URI 1011 Sphere solution in  Python:

raio = int(input())

pi = 3.14159

volume = float(4.0 * pi * (raio* raio * raio) / 3)

print("VOLUME = %0.3f" %volume)

URI Solution 1011 Sphere Code / URI 1011 Sphere solution in  C# (C Sharp):

Demonstration:

It’s pretty simple. The equation to solve URI 1011 is given (4/3) * pi * RJust in this line,

printf("VOLUME = %.3lfn", (4 * 3.14159 * pow(a, 3)) / 3);

Just implement this in coding. Since having any problem just put a comment below. Thanks

Tags: URI Online Judge Solution, URI OJ Solution list, URI Problems Solution, URI solver, URI all problem solution list, URI Sphere code in C, URI 1011 Sphere code in C++, URI Sphere  solution in C, URI solution, URI 1011 Sphere  solution in C,URI 1011 Sphere solution in C++-CPP,URI 1011 Sphere solution in C# (C sharp),URI 1011 Sphere solution in Java,URI 1011 Sphere solution in Python,

By Maniruzzaman Akash

Maniruzzaman Akash is a freelance web developer with most popular Laravel PHP frameork and Vue JS

Leave a Reply

Your email address will not be published. Required fields are marked *