Você está na página 1de 4

If Else

Linguagem C

#include <stdio.h>

#include <stdlib.h>

int main ()

int num1, num2, maior;

printf("Entre com 2 numeros inteiros");

scanf("%d %d", &num1, &num2);

if (num1 > num2)

maior = num1;

else

maior = num2;

printf("O maior numero e: %d", maior);

system("pause");

return 0;

}
Em java

public class meuifelse {

public static void main(String[] args) {


if (1 == 2){

System.out.println("Voc nunca ler essa mensagem, mwahuahuauha");

if (1 == 1){

System.out.println("1 igual a 1? Jura? ");

}
Em Php

<?php

$nota1 = 5;

$nota2 = 5;

$notaTotal = ($nota1 + $nota2) / 2;

if ($notaTotal < 6){

echo ("Aluno Reprovado");

} else {

echo "Aluno Aprovado";

?>

Você também pode gostar