karlangadas

lp1 romanos

Apr 4th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. char leerPalabra(){
  4. char c;
  5. scanf(" %c",&c);
  6. while(c!=' ' && c!='\t' && c!='\n' && c!=EOF){
  7. putchar(c);
  8. c=getchar();
  9. }
  10. return c;
  11. }
  12. int main() {
  13. int cod,edad;char c;
  14. printf("\t\t\tALUMNO CALIFICACIÓN\n");
  15. for(int i=0;i<90;i++) printf("*"); printf("\n");
  16. printf("Código\t\tNombre\t\t\tEdad\tRespondidas \t Correctas \t Incorrectas\t\tNota\n");
  17. while(scanf("%d",&cod)==1){
  18. printf("%d ",cod);
  19. while(scanf("%d",&edad)==0) c=leerPalabra();
  20. printf(" %d",edad);
  21.  
  22. }
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment