Created
March 30, 2013 21:56
-
-
Save bernardoVale/5278535 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Programa 01 | |
#include <iostream> | |
using namespace std; | |
int main(){ | |
cout << "\nEXEMPLO 01 - SOMAR DOIS NUMEROS"; | |
//Declaracao de variaveis. | |
int num1, num2, soma; | |
//Leitura do primeiro numero. | |
cout << "\nDigite um numero: "; | |
cin >> num1; | |
//Leitura do segundo numero. | |
cout << "\nDigite um numero: "; | |
cin >> num2; | |
//Somar os dois numeros | |
soma = num1 + num2; | |
//Imprimir na tela o resultado da soma. | |
cout << "\nSoma:" << soma << endl; | |
system("PAUSE"); | |
return 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Exerc��cio Te�orico 3
Comando condicional
Utilize operador switch-
case