Advertisement
juanjo12x

LP_Reporte_CPP_LAB2_2014_2

Sep 29th, 2014
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.93 KB | None | 0 0
  1. #include <cstdio>
  2. #include "reporte.h"
  3. #include "ordenamiento.h"
  4.  
  5. char pasarPalabra(){
  6.     char c;
  7.     while ((c=getchar()) == ' ' || c == '\t');
  8.     do{
  9.         putchar(c);
  10.         c = getchar();
  11.     }while(c!=' ' && c!='\n' && c!='\t');
  12.     return c;
  13. }
  14.  
  15. int leerResultados(char A[N], int &n){
  16.     char c;
  17.     n = 0;
  18.     while (1){
  19.         c = getchar();
  20.         if (c == '\n') return 0;
  21.         if (c == EOF) return c;
  22.         if (c == ' ' || c == '\t') continue;
  23.         A[n++] = c;
  24.     }
  25. }
  26.  
  27. int leerResultados(int A[N], int &n){
  28.     char c;
  29.     n = 0;
  30.     while(1){
  31.         scanf("%d", &A[n++]);
  32.         c = getchar();
  33.         if (c == '\n') return 0;
  34.         if (c == EOF) return c;
  35.     }
  36. }
  37.  
  38. int leerResultados(float A[N], int &n){
  39.     char c;
  40.     n = 0;
  41.     while(1){
  42.         scanf("%f", &A[n++]);
  43.         c = getchar();
  44.         if (c == '\n') return 0;
  45.         if (c == EOF) return c;
  46.     }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement