Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // paralelo_ejemplo1.cpp : main project file.
- #include "stdafx.h"
- #include <stdio.h>
- #include <conio.h>
- #define N 10
- using namespace System;
- int main(array<System::String ^> ^args)
- {
- int vedad[N];
- float vnota[N];
- for(int i=0;i<N;i++)
- {
- do{ printf("Ingrese edad: ");
- scanf("%d",&vedad[i]);
- }while(vedad[i]<0 || vedad[i]>100);
- do{ printf("Ingrese nota: ");
- scanf("%f",&vnota[i]);
- }while(vnota[i]<0 || vnota[i]>20);
- }
- for(int i=0;i<N;i++)
- if(vedad[i]>=18)
- printf("%d ",vnota[i]);
- _getch();
- return 0;
- }
Add Comment
Please, Sign In to add comment