quarta-feira, 24 de outubro de 2018

URI PROBLEMA 1003 - Soma Simples EM C

URI Online Judge | 1003

Soma Simples

Adaptado por Neilor Tonin, URI  Brasil
Timelimit: 1
Leia dois valores inteiros, no caso para variáveis A e B. A seguir, calcule a soma entre elas e atribua à variável SOMA. A seguir escrever o valor desta variável.

Entrada

O arquivo de entrada contém 2 valores inteiros.

Saída

Imprima a variável SOMA com todas as letras maiúsculas, com um espaço em branco antes e depois da igualdade seguido pelo valor correspondente à soma de A e B. Como todos os problemas, não esqueça de imprimir o fim de linha após o resultado, caso contrário, você receberá "Presentation Error".


URI Online Judge | 1003

Simple Sum

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
Read two integer values, in this case, the variables A and B. After this, calculate the sum between them and assign it to the variable SOMA. Write the value of this variable.

Input

The input file contains 2 integer numbers.

Output

Print the variable SOMA with all the capital letters, with a blank space before and after the equal signal followed by the corresponding value to the sum of A and B. Like all the problems, don't forget to print the end of line, otherwise you will receive "Presentation Error"



#include <stdio.h>

int main() {
    int a,b,x;
    scanf("%d %d", &a, &b);
    x = a+b;
    printf("SOMA = %d\n", x);
 
    return 0;
}

Nenhum comentário:

Postar um comentário

URI PROBLEMA 1133 - Resto da Divisão SOLUÇÃO EM C

URI Online Judge | 1133 Resto da Divisão Adaptado por Neilor Tonin, URI   Brasil Timelimit: 1 Escreva um programa que leia 2 valo...