C# / C++ Problem – Ramesh’s basic salary is input through the keyboard, Calculate his gross salary



C# / C++ Problem – Ramesh’s basic salary is input through the keyboard, Calculate his gross salary

C# / C++ Problem - Ramesh’s basic salary is input through the keyboard, Calculate his gross salary

Solve real-life C# problems

Chapters:
0:00 – Intro
1:28 – Main program solution
6:32 – Verification of program
6:59 – Recap and variable types in C#

This is the very first video of this playlist of C# Problems Solving, As the time pass we will go from Basic to Advance where we will be solving complex problems using arrays and loops.

In this video we have solved below problem statement:
Q1): Ramesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary.

Complete code of this video is as follows:

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

namespace practiveapp
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine(“Enter Ramesh basic salary: “);
double basicSalary = Convert.ToDouble(Console.ReadLine());

double dearnessAllounce = 0.4 * basicSalary;
double houseAllounce = 0.2 * basicSalary;

double grossSalary = basicSalary + dearnessAllounce + houseAllounce;

Console.WriteLine(“Ramesh basic salary is {0} and his gorss salary is {1}”,basicSalary,grossSalary);

}
}
}