URI Online Judge Solution 1013 The Greatest – URI 1013 solution in C, C++, Java, Python and C#

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

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

URI Online Judge Solution 1013 The Greatest - URI 1013 solution in C, C++, Java, Python and C#

URI Solution 1013 The Greatest Code in C / URI 1013 code in C:

#include <stdio.h>

int
main()
{

int
a, b, c, tmp;

scanf("%d %d %d", &a, &b, &c);

tmp = a;
if
(a < b || a < c){
if
(b < c){
tmp = c;
}
else{
tmp = b;
}
}


printf("%d eh o maiorn", tmp);

return
0;
}

URI Solution 1013 The Greatest Code / URI 1013 The Greatest solution in CPP:

#include <cstdio>

int
main()
{

int
a, b, c, tmp;

scanf("%d %d %d", &a, &b, &c);

tmp = a;
if
(a < b || a < c){
if
(b < c){
tmp = c;
}
else{
tmp = b;
}
}


printf("%d eh o maiorn", tmp);

return
0;
}

URI Solution 1013 The Greatest Code / URI 1013 The Greatest solution in Java:

import java.util.Scanner;

public class
Main {

public static
void main(String[] args) {

int
a, b, c, tmp;

Scanner sc = new Scanner(System.in);
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();

tmp = a;
if
(a < b || a < c){
if
(b < c){
tmp = c;
}
else{
tmp = b;
}
}


System.out.printf("%d eh o maiorn", tmp);

}

}

URI Solution 1013 The Greatest Code / URI 1013 The Greatest solution in  Python:

import math

valor = input().split(" ")

a, b, c = valor

maior = (int(a) + int(b) + abs(int(a) - int(b))) / 2
resultado = (int(maior) + int(c) + abs(int(maior) - int(c)))/2

print("%d eh o maior" %resultado)

URI Solution 1013 The Greatest Code / URI 1013 The Greatest solution in  C# (C Sharp):

Demonstration:

First take value
Then using just if-else statement, put the largest value here in tmp and finally print the tmp

 if(a < b || a < c){
if
(b < c){
tmp = c;
}
else{
tmp = b;
}
}

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 The Greatest  code in C, URI 1013 The Greatest code in C++, URI The Greatest  solution in C, URI solution, URI 1013 The Greatest solution in C,URI 1013 The Greatest solution in C++-CPP,URI 1013 The Greatest solution in C# (C sharp),URI 1013 The Greatest solution in Java,URI 1013 The Greatest 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 *