Guest User

Untitled

a guest
Feb 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. // paralelo_ejemplo1.cpp : main project file.
  2. #include "stdafx.h"
  3. #include <stdio.h>
  4. #include <conio.h>
  5. #define N 10
  6. using namespace System;
  7. int main(array<System::String ^> ^args)
  8. {
  9. int vedad[N];
  10. float vnota[N];
  11. for(int i=0;i<N;i++)
  12. {
  13. do{ printf("Ingrese edad: ");
  14. scanf("%d",&vedad[i]);
  15. }while(vedad[i]<0 || vedad[i]>100);
  16. do{ printf("Ingrese nota: ");
  17. scanf("%f",&vnota[i]);
  18. }while(vnota[i]<0 || vnota[i]>20);
  19. }
  20.  
  21. for(int i=0;i<N;i++)
  22. if(vedad[i]>=18)
  23. printf("%d ",vnota[i]);
  24. _getch();
  25. return 0;
  26. }
Add Comment
Please, Sign In to add comment