Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1)
- 2)
- /*
- Autor: Lucas Alarcon
- Fecha: 02-08-2017
- Nombre del programa: Nota Final Programación
- Proposito: Calcula la nota final del alumno y si aprueba o reprueba
- */
- #include <stdio.h>
- #include <math.h>
- #include <stdlib.h>
- int main()
- {
- float M1,M2,M3,M4,NE,NP,NF;
- scanf("%f %f %f %f",&M1,&M2,&M3,&M4);
- NP = ((M1*0.15)+(M2*0.2)+(M3*0.3)+(M4*0.35));
- if ((NP>=5)&&(M1>=4)&&(M2>=4)&&(M3>=4)&&(M4>=4))
- {
- NF = NP;
- printf("Eximido : ");
- }
- else if ((NP<3))
- {
- NF = NP;
- printf("Reprobado : ");
- }
- else
- {
- scanf("%f",&NE);
- NF = ((NP*0.6)+(NE*0.4));
- if(NF>=4)
- {
- printf("Aprobado : ");
- }
- else
- {
- printf("Reprobado : ");
- }
- }
- printf("%.1f",NF);
- return 0;
- }
- 3)
- 4)
- 5)
- /*
- Autor: Lucas Alarcon
- Fecha: 02-08-2017
- Nombre del programa: Set de Tenis de Mesa
- Proposito:indica la situación actual del Set
- */
- #include <stdio.h>
- #include <math.h>
- #include <stdlib.h>
- int main ()
- {
- int P1,P2;
- scanf("%d %d",&P1,&P2);
- if (((P1>11)&&(P2<9))||((P2>11)&&(P1<9)))
- {
- printf("Resultado imposible");
- }
- else if((P1>P2+2)&&(P1=11))
- {
- printf("Jugador 1 gana el Set");
- }
- else if((P2>P1+2)&&(P2=11))
- {
- printf("Jugador 2 gana el Set");
- }
- else if((P1<11)&&(P2<11))
- {
- printf("Set aun no termina");
- }
- return 0;
- }
- 6)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement