Categories
C#

Student Grade Solver in C#

Machine Problem

Write a C# program that will input your grades in different subjects last year  and display the average grade, highest grade and lowest grade using math  function.

Sample Output:

Enter grade in English: 89 

Enter grade in Math: 91 

Enter grade in Filipino: 92 

Enter grade in Science: 88

Average: 90

Lowest Grade: 88

Highest Grade:92

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Program Listing

// grade_solver.cs
// Author : Mr. Jake Rodriguez Pomperada, MAED-IT, MIT
// www.jakerpomperada.com
// www.jakerpomperada.blogspot.com
// jakerpomperada@gmail.com
// Bacolod City, Negros Occidental, Philippines

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int average_grade = 0;
            int total_grade = 0;
            int[] grades = new int[4];
            string[] subjects =
            new string[] { "English", "Math", "Filipino", "Science"};
            Console.WriteLine("\n");
            Console.WriteLine("\tStudent Grade Solver in C#");
            Console.WriteLine("\n");
            
		for(int i =0 ; i<4; i++){
            Console.Write("\tEnter Grade in " + subjects[i] + " : ");
			grades[i] = int.Parse(Console.ReadLine());

            total_grade += grades[i];

            average_grade = (total_grade / 4);
		}
		
		
		int highest_grade = grades[0];
		int lowest_grade  = grades[0];
		
		
		for(int i=0; i<4; i++){
            if (grades[i] > highest_grade)
            {
                highest_grade = grades[i];
			}
			if(grades[i] < lowest_grade){
                lowest_grade = grades[i];
			}
		}
		    Console.WriteLine("\n");
            Console.WriteLine("\tAverage       :  {00}",average_grade);
            Console.WriteLine("\tLowest Grade  :  {00}",lowest_grade);
            Console.WriteLine("\tHighest Grade :  {00}",highest_grade);
            Console.WriteLine("\n");
            Console.WriteLine("\tEnd of Program");
            Console.WriteLine("\n\n");
            Console.ReadKey(); 
        }
    }
}
Categories
C#

Weekly Total Expenses in C#

 Write a C# program that will input all your expenses for the week and display the total expenses.

Sample dialogue:

Food: 500.00

Grocery: 200.00

Cellphone/Internet Load: 100

Others: 300.00

Total Expenses: 1100.00

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Program Listing

// Mr. Jake R. Pomperada, MAED-IT, MIT
// www.jakerpomperada.com
// www.jakerpomperada.blogspot.com
// jakerpomperada@gmail.com
// March 19, 2021 Friday

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WeeklyExpenses
{
    class Program
    {
        static void Main(string[] args)
        {

            double food = 0.00;
            double grocery = 0.00;
            double cellphone_load = 0.00;
            double others = 0.00;
            double total_expenses = 0.00;

            Console.WriteLine("\n");
            Console.WriteLine("\tWeekly Total Expenses in C#");
            Console.WriteLine("\n");
            Console.Write("\tWhat is your expenses for Food? ");
            food = Double.Parse(Console.ReadLine());

            Console.Write("\tWhat is your expenses for Grocery? ");
            grocery = Double.Parse(Console.ReadLine());

            Console.Write("\tWhat is your expenses for Cellphone/Internet Load? ");
            cellphone_load = Double.Parse(Console.ReadLine());
            
            Console.Write("\tWhat is your other expenses? ");
            others = Double.Parse(Console.ReadLine());
            
            total_expenses = (food + grocery + cellphone_load + others);

            Console.WriteLine("\n");
            Console.WriteLine("\tTotal Expenses : PHP {0:0.00}", total_expenses);
            Console.WriteLine("\n");
            Console.WriteLine("\tEnd of Program");
            Console.WriteLine("\n\n");
            Console.ReadKey(); 
        }
    }
}