Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Faça um programa que leia um vetor com 5 nomes, e imprima estes nomes enumerados pela ordem em que foram digitados.
- Exemplo de saída: 1- José
- 2-Carlos
- 3-Marta
- 4-Lucas
- 5-Alex*/
- #include<stdio.h>
- #include<conio.h>
- main ()
- {
- char vetor[5][30];
- int i;
- for (i=0; i<5; i++)
- {
- printf ("\n Digite um nome %d : ", i+1);
- scanf ("%s",&vetor[i]);
- }
- for (i=0; i<5; i++)
- {
- printf ("\n %d - %s",i+1, &vetor[i]);
- }
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement