Advertisement
Guest User

Untitled

a guest
Aug 27th, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Calculocalifas
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int p1=0;
  14. int t1 = 0;
  15. int temp1 = 0;
  16. int p2 = 0;
  17. int t2 = 0;
  18. int temp2 = 0;
  19. int exf = 0;
  20. int proy = 0;
  21. int tempf = 0;
  22. int tempuf = 0;
  23. int asi = 0;
  24. int tempcom=0;
  25. int tempas=0;
  26. string si;
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33. Console.WriteLine("Calificación del primer parcial: ");
  34. p1 = int.Parse(Console.ReadLine());
  35. Console.WriteLine("Calificación de las tareas del primer parcial:");
  36. t1 = int.Parse(Console.ReadLine());
  37. temp1= calculoparcial(p1, t1);
  38. Console.WriteLine("Total del parcial 1= " + temp1);
  39.  
  40. Console.WriteLine("Calificación del segundo parcial");
  41. p2 = int.Parse(Console.ReadLine());
  42. Console.WriteLine("Calificación de las tareas del segundo parcial");
  43. t2 = int.Parse(Console.ReadLine());
  44. temp2 = calculoparcial(p2, t2);
  45. Console.WriteLine("Total del parcial 2= " + temp2);
  46.  
  47. Console.WriteLine("Calificación del examen final: ");
  48. exf = int.Parse(Console.ReadLine());
  49. Console.WriteLine("Calificación del proyecto final: ");
  50. proy = int.Parse(Console.ReadLine());
  51. tempf = calculofinal(exf, proy);
  52. Console.WriteLine("Total del prefinal= " + tempf);
  53.  
  54. Console.WriteLine("Total de asistencias: ");
  55. asi = int.Parse(Console.ReadLine());
  56.  
  57.  
  58. tempuf = temp1 + temp2 + tempf;
  59. if (asi == 30)
  60. {
  61. if (tempuf <= 95)
  62. {
  63. tempas = 5;
  64. tempcom = tempuf + tempas;
  65. Console.WriteLine("La calificación final es: " + tempcom);
  66.  
  67.  
  68. }
  69. else
  70. {
  71. Console.WriteLine("La calificación finel es: " + tempuf);
  72. }
  73. }
  74. else
  75. {
  76. Console.WriteLine("La calificación final es: " + tempuf);
  77.  
  78. }
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88. }
  89. static int calculoparcial(int califaparcial, int califatareas)
  90. {
  91. return (int)((califaparcial * .8f + califatareas * .2f) * .3f);
  92.  
  93. }
  94. static int calculofinal(int califaex, int califaproy)
  95. {
  96. return (int)((califaex*.2f + califaproy*.2f));
  97.  
  98. }
  99.  
  100.  
  101. }
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement