Categories
C#

Addition of Two Numbers in C#

 A simple program to ask the user to give two numbers and the program will compute the sum of two numbers using C# programming language.

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 in 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.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City I also accepting computer repair, networking and Arduino Project development at a very affordable price.


Program Listing

// Addition_Two_Numbers.cs
// Author   : Mr. Jake Rodriguez Pomperada, MAED-IT, MIT
// Date     : October 4, 2020    Sunday  9:20 AM
// Website  : http://www.jakerpomperada.com
//            http://www.jakerpomperada.blogspot.com
// Email    : jakerpomperada@gmail.com
// Location : Bacolod City, Negros Occidental, Philippines

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

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

        Console.Write("\n");
        Console.Write("\tAddition of Two Numbers in C#\n\n"); 
        Console.Write("\tGive First Value  :  ");
        int a = Convert.ToInt32(Console.ReadLine());
        Console.Write("\tGive Second Value : ");
        int b = Convert.ToInt32(Console.ReadLine());

        // Perform addition of two numbers 
      int sum = (a+b);
      Console.Write("\n");
      Console.WriteLine("\tThe sum of {0} and {1} is {2}.", a, b, sum);
      Console.Write("\n");
      Console.Write("\tEnd of Program");
      Console.Write("\n");
      Console.ReadKey(); 
        }
    }
}
Categories
C#

Odd and Even Numbers in C#

I wrote this simple program using C# programming language to ask the user to give a number and then the program will check and determine whether the given number is an odd or even number.

I am currently accepting programming work inventory system, enrollment system, accounting system, point of sale, school programming assignments and projects, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in 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. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com

Sample Program Output
Sample Program Output

Program Listing

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Odd_and_Even_Numbers
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int a = 0;

            a = Convert.ToInt32(textBox1.Text);



            if (a % 2 == 0)

            {

                MessageBox.Show("The given number " + a + " is a Even Number.",

                 "The Result");

            }
            else

            {



                MessageBox.Show("The given number " + a + " is a Odd Number.",

                 "The Result");

            }


        }

        private void button2_Click(object sender, EventArgs e)
        {
            textBox1.Text = "";
            textBox1.Focus();
        }
    }
}
Categories
C#

Positive and Negative Numbers in C#

A simple program that I wrote using C# to ask the user to give a number and then the program will check and determine whether the given number is a positive or negative number.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in 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. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com

Sample Program Output
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Positive_and_Negative_Numbers
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int a = 0;
            a = Convert.ToInt32(textBox1.Text);

         if (a >= 0)
            {
                MessageBox.Show("The given number " + a +  " is a Positive Number.",
                 "The Result");
            } else
            {

                MessageBox.Show("The given number " + a + " is a Negative Number.",
                 "The Result");
            }
            
        }

        private void button2_Click(object sender, EventArgs e)
        {
            textBox1.Text = "";
            textBox1.Focus();
        }
    }
}
Categories
C#

Sally Grocery Ordering System in C#

I wrote this program to demonstrate how to create and implement an ordering system using C# programming language. I called this program Sally Grocery Ordering System.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in 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. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.comI am also a book author you can purchase my books on computer programming and information technology in the following links below.https://www.unlimitedbooksph.com/

Sample Program Output

// Author  : Jake Rodriguez Pomperada
// Date    : June 13, 2020   6:21 AM Saturday
// Website : www.jakerpomperada.com
// Email   : jakerpomperada@gmail.com

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

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

            int p0 = 0,p1 = 0,p2 = 0,p3 = 0,p4 = 0,p5 = 0,payment=0;

            double sum = 0.00,total_cost = 0.00;
           
            char decision;

            double total_price = 0.00;

            int[] final_qty = new int[100];

            int[] product_number = { 0, 1, 2, 3, 4, 5 };

            string[] product_title = { "Product Number", "Product Name", "Item Price" };

            string[] product_title2 = { "Product Name", "Quantity", "Item Price", "Total Cost" };

            string[] product_name = {"555 Tuna","Nido Milk", "Magic Flakes",
                                     "Milo Mix","LuckyMe Noodles","Century Tuna"};

            double[] item_price = {21.71,25.43,37.28,43.17,12.43,26.81};

            do
            {
                Console.WriteLine("\n");
                Console.WriteLine("\t\t===== Sally Grocery Ordering System in C# =====");
                Console.WriteLine();
                Console.WriteLine("\t" + product_title[0] + "\t" + product_title[1] + "\t   " + product_title[2]);
                Console.WriteLine();
                for (int a = 0; a < product_name.Length; a++)
                {
                    Console.WriteLine("\t\t" + product_number[a] + "\t" + product_name[a] + "\t    " + item_price[a].ToString("00.00"));
                }

                Console.WriteLine();
                Console.Write("\tSelect the Product Number to choose the Product :  ");
                int choose = Convert.ToInt32(Console.ReadLine());

                Console.Write("\tHow many pieces?  ");
                int quantity = Convert.ToInt32(Console.ReadLine());



                switch (choose)
                {
                    case 0:
                        p0 += quantity;
                        final_qty[0] = p0;
                        break;

                    case 1:
                        p1 += quantity;
                        final_qty[1] = p1;
                        break;

                    case 2:
                        p2 += quantity;
                        final_qty[2] = p2;
                        break;

                    case 3:
                        p3 += quantity;
                        final_qty[3] = p3;
                        break;

                    case 4:
                        p4 += quantity;
                        final_qty[4] = p4;
                        break;


                    case 5:
                        p5 += quantity;
                        final_qty[5] = p5;
                        break;

                  
                }

                Console.WriteLine();
                Console.Write("\tWould you like to order again? Y/N : ");
                decision = char.ToUpper(Console.ReadKey().KeyChar);
                Console.WriteLine();

            } while (decision != 'N');
         
            Console.WriteLine("\n");
          Console.WriteLine("\t===== FINAL PURCHASE =====");
         Console.WriteLine("\t\t" + product_title2[0] + "\t\t" + product_title2[1]
                    + "\t" + product_title2[2] + "\t" + product_title2[3]);
    
		for(int i=0; i < final_qty.Length; i++)
		{
			if(final_qty[i] != 0)
			{
                
                double compute_two = final_qty[i] * item_price[i];
                Console.WriteLine("\t\t" + product_name[i] + "\t\t  "
                               + final_qty[i] + "\t\t " + item_price[i].ToString("#####.00")
                               + "\t\t PHP " + compute_two.ToString("#####.00"));
            
				sum = sum + final_qty[i]*item_price[i];
			}
		}
        Console.WriteLine();
        Console.WriteLine("\tTotal Number of Purchased items: " + (p0 + p1 + p2 + p3 + p4 + p5));
        Console.WriteLine();
        Console.WriteLine("\tTotal Purchase PHP : " + sum.ToString("#####.00")); 
		
		do
		{
        Console.WriteLine();
		Console.Write("\tEnter Your Payment  PHP : ");
        payment = Convert.ToInt32(Console.ReadLine());
		
	 	}while(sum > payment);
        double compute_all = (payment - sum);
        Console.WriteLine();
		Console.WriteLine("\tYour Change is PHP : "+ compute_all.ToString("#####.00"));
        Console.WriteLine();
        Console.WriteLine("\t\tThank you for buying at Sally's Grocery.");
        Console.WriteLine();
        Console.Write("\t\tEND OF PROGRAM");
        Console.ReadKey();
        }

 }
       
}  // End of Code