SHARE
TWEET

Untitled

a guest Jun 17th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. typedef struct{
  5.     int qtdeNumeros;
  6.     int qtdeRepetidos;
  7.     float numeros[];
  8. }Sequencia;
  9.  
  10.  
  11. int main()
  12. {
  13.  
  14.     Sequencia sequencia;
  15.  
  16.     printf("Quantos numeros deseja colcoar na sequencia? ");
  17.     scanf("%d", &sequencia.qtdeNumeros);
  18.  
  19.     for(int i=0; i < sequencia.qtdeNumeros; i++){
  20.         printf("Digite o numero [%d]: ", i+1);
  21.         scanf("%f", &sequencia.numeros[i]);
  22.     }
  23.  
  24.     for(int i = 0; i<sequencia.qtdeNumeros; i++){
  25.         printf("Numeros [%d]: %fn", i+1, sequencia.numeros[i]);
  26.     }
  27.     return 0;
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top