Nero Swallowtail
Honorary Poster
Di ko sure kung tama tong nagawa ko e, pa check nga po ako kung tama , feel ko tama ko yung number 2 sa number 1 lang ako nalilito, salamat po sa sasagot.
Eto yung instruction:

Eto yung code:
Hide react ko lang para pam pa elite, charot para di magulo hehe
Eto yung instruction:

Eto yung code:
C#:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace QuizMethods
{
class QuizMethods
{
static void Main(string[] args)
{
QuizMethods obj = new QuizMethods();
Console.WriteLine("Number 1.");
Console.Write("Enter the first number: ");
int num1 = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter the second number: ");
int num2 = Convert.ToInt32(Console.ReadLine());
int firstNum = obj.getNum(num1, num2);
Console.WriteLine("Total of the both number: " + firstNum);
Console.Write("Enter the first number: ");
int num3 = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter the second number: ");
int num4 = Convert.ToInt32(Console.ReadLine());
int secondNum = obj.getNum(num3, num4);
Console.WriteLine("Total of the both number: " + secondNum);
Console.Write("Enter the first number: ");
int num5 = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter the second number: ");
int num6 = Convert.ToInt32(Console.ReadLine());
int thirdNum = obj.getNum(num5, num6);
Console.WriteLine("Total of the both number: " + thirdNum);
Employee newEmployee = new Employee();
Console.WriteLine("Number 2.");
Console.Write("Enter your employee ID: ");
newEmployee.employeeID = Convert.ToInt64(Console.ReadLine());
Console.Write("Enter your first name: ");
newEmployee.firstName = Convert.ToString(Console.ReadLine());
Console.Write("Enter your last name: ");
newEmployee.lastName = Convert.ToString(Console.ReadLine());
Console.Write("Enter your position: ");
newEmployee.postition = Convert.ToString(Console.ReadLine());
newEmployee.displayInfo();
Console.ReadKey();
}
private int getNum(int firstNum, int secondNum)
{
int totalNum = firstNum + secondNum;
return totalNum;
}
private int getNum(double firstNum, double secondNum)
{
double total = firstNum + secondNum;
int newTotal = (int)total;
return newTotal;
}
private int getNum(long firstNum, long secondNum)
{
long newTotal = firstNum + secondNum;
int totalNew = (int)newTotal;
return totalNew;
}
private struct Employee
{
public long employeeID;
public String firstName, lastName, postition;
private void setInfo(long employeeID, String firstName, String lastName, String postition)
{
this.employeeID = employeeID;
this.firstName = firstName;
this.lastName = lastName;
this.postition = postition;
}
public void displayInfo()
{
Console.WriteLine("Employee ID: " + employeeID);
Console.WriteLine("Name: " + firstName + " " + lastName);
Console.WriteLine("Position: " + postition);
}
}
}
}