Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Calculocalifas
- {
- class Program
- {
- static void Main(string[] args)
- {
- int p1=0;
- int t1 = 0;
- int temp1 = 0;
- int p2 = 0;
- int t2 = 0;
- int temp2 = 0;
- int exf = 0;
- int proy = 0;
- int tempf = 0;
- int tempuf = 0;
- int asi = 0;
- int tempcom=0;
- int tempas=0;
- string si;
- Console.WriteLine("Calificación del primer parcial: ");
- p1 = int.Parse(Console.ReadLine());
- Console.WriteLine("Calificación de las tareas del primer parcial:");
- t1 = int.Parse(Console.ReadLine());
- temp1= calculoparcial(p1, t1);
- Console.WriteLine("Total del parcial 1= " + temp1);
- Console.WriteLine("Calificación del segundo parcial");
- p2 = int.Parse(Console.ReadLine());
- Console.WriteLine("Calificación de las tareas del segundo parcial");
- t2 = int.Parse(Console.ReadLine());
- temp2 = calculoparcial(p2, t2);
- Console.WriteLine("Total del parcial 2= " + temp2);
- Console.WriteLine("Calificación del examen final: ");
- exf = int.Parse(Console.ReadLine());
- Console.WriteLine("Calificación del proyecto final: ");
- proy = int.Parse(Console.ReadLine());
- tempf = calculofinal(exf, proy);
- Console.WriteLine("Total del prefinal= " + tempf);
- Console.WriteLine("Total de asistencias: ");
- asi = int.Parse(Console.ReadLine());
- tempuf = temp1 + temp2 + tempf;
- if (asi == 30)
- {
- if (tempuf <= 95)
- {
- tempas = 5;
- tempcom = tempuf + tempas;
- Console.WriteLine("La calificación final es: " + tempcom);
- }
- else
- {
- Console.WriteLine("La calificación finel es: " + tempuf);
- }
- }
- else
- {
- Console.WriteLine("La calificación final es: " + tempuf);
- }
- }
- static int calculoparcial(int califaparcial, int califatareas)
- {
- return (int)((califaparcial * .8f + califatareas * .2f) * .3f);
- }
- static int calculofinal(int califaex, int califaproy)
- {
- return (int)((califaex*.2f + califaproy*.2f));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement