Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //GILMAR JUNIOR DOS PASSOS - PROF MALGARETE
- //ALGORITMOS 02 CENTRO TECNOLOGICO UNIVERSIDADE POSITIVO
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- #include <iostream>
- #include <conio.h>
- #include <time.h>
- #define XXX 5
- //Faça um algoritmo que recebe 5 valores em R$ informados pelo usuário
- //e armazene-os em um vetor. Depois, leia esse vetor mostrando o valor
- //armazenado multiplicado por 2 (dois).
- int main ()
- {
- int valores[2][XXX], cont;
- for (cont=0;cont<XXX;cont++)
- {
- printf ("Entre com um valor\n");
- scanf("%d",valores[1][cont]);
- valores[2][cont]=valores[1][cont]*2;
- printf("O valor informado foi %d e sua multiplicação por 2 é: %d", valores[1][cont], valores[2][cont]);
- }
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment