diogoAlves

IFF/Introdução à Programação/Slide/Pag 61/Ex 4

Mar 8th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. //IFF - Introdução à Programação
  2. //Slide - Página 61 - Exercício 4
  3. #include<stdio.h>
  4. #include<locale.h>
  5.  
  6. void Exibir(int numero){
  7.     int i,vetor[numero];
  8.     for(i=0;i<=numero;i++){
  9.         vetor[i]=i;
  10.         for(int c=0;c<=i;c++){
  11.             printf("%d ",vetor[c]);
  12.         }
  13.         printf("\n");
  14.     }
  15. }
  16. int main(){
  17.     setlocale(LC_ALL,"Portuguese");
  18.     int numero;
  19.     printf("Entre com o número objetivo: ");
  20.     scanf("%d",&numero);
  21.     Exibir(numero);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment