Posts

Showing posts from November, 2023

Print Fees Slip In C# Program.

CODE:  using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Array_Practise1 {     class Program     {         static void Main(string[] args)         {                 double dis = 0,pay;             double tfees=0;             Console.WriteLine("Enter Your Name");             string sname = Convert.ToString(Console.ReadLine());             Console.WriteLine("Enter Your Registration No");             int reg = Convert.ToInt32(Console.ReadLine());             Console.WriteLine("Enter your Departmrnt");             string dep = Convert.ToString(Console.ReadLine());           ...

Create A program to Calculate GPA Of Student Of University in C#.

  CODE: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Array_Practise1 {     class Program     {         static void Main(string[] args)         {             double tgpp=0, tchrs=0,gpa=0;             Console.WriteLine("Enter No Of Courses:");             int nc = Convert.ToInt32(Console.ReadLine());             string[] cname = new string[nc];             double[] chrs = new double[nc];             double[] marks = new double[nc];             string[] grade = new string[nc];             double[] gp = new double[nc];             double[] gpp = new double[nc];       ...

Input all the expenditure of 4 weeks and find min, max and average expense. in c#

 CODE: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace cp_theory_task_paractise {     class Program     {         static void Main(string[] args)         {                           int min = 0, max = 0, avg = 0, n,exp,texp=0;             Console.WriteLine("Enter no of weeks");             n = Convert.ToInt32(Console.ReadLine());             for (int i = 1; i <= n; i++)             {                 Console.WriteLine("Enter Expenses of week {0}",i);                 exp = Convert.ToInt32(Console.ReadLine());                 if (i == 1)   ...

Create a program to enter Bahria university, You can only enter if you’re a student or faculty or employee. in c#

 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace cp_theory_task_paractise {     class Program     {         static void Main(string[] args)         {                  string type;             Console.WriteLine("\t\tWelcome to Bahria University Entrance\n");             Console.WriteLine("Enter your role:");             type = string.Format(Console.ReadLine().ToLower());             if (type=="student" || type=="faculty" || type=="employee")             {                 Console.WriteLine("You are allowed to enter Bahria University.\n");                 Console.WriteLine("Beaca...

ï‚· Create a program to enter computer programming class,(University = Bahria, Department = BSE, Class = Programming).

 code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace cp_theory_task_paractise {     class Program     {         static void Main(string[] args)         {                  string uni,depart,clas;             Console.WriteLine("Enter your university");             uni = Convert.ToString(Console.ReadLine().ToLower());             if (uni=="bahria")             {                 Console.WriteLine("Enter your Department");                 depart = Convert.ToString(Console.ReadLine());                 if (depart=="bse" || depart=="BSE")         ...

Total Expenditure of month program in c#.

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace cp_theory_task_paractise {     class Program     {         static void Main(string[] args)         {               int travel, stat, lunch, tday = 0, texp = 0, day = 0, ts = 0, tt = 0, tl = 0;             do             {                 Console.WriteLine("Enter Travel Exp of day:{0}", day + 1);                 travel = Convert.ToInt32(Console.ReadLine());                 tt = tt + travel;                 Console.WriteLine("Enter Stationary Exp of day:{0}", day + 1);                 stat = Convert.ToInt32(Cons...

voting program using if-else in c#.

  using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CP_Looping_Paractise {     class Program     {         static void Main(string[] args)         {                   char rep;                 string name;                 int age, tv = 0;                 do                 {                     Console.WriteLine("Enter Age");                     age = Convert.ToInt32(Console.ReadLine());                     if (age >= 18)                     { ...

find min, max, avg, amount uses in a week in c# program.

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CP__TH__task {     class Program     {         static void Main(string[] args)         {             int n,cnt=1,amt,sv,tamt=0,tsv=0,max=0,min=0,avg=0;             Console.WriteLine("Enter No of Days:");             n = Convert.ToInt32(Console.ReadLine());             for (int i = 1; i <= n; i++)             {                 Console.WriteLine("Enter Amount of day{0} ",cnt);                 amt = int.Parse(Console.ReadLine());                 tamt += amt;                 Console.WriteLine("Enter S...

Vertical and Reverse Paramid in c# using loop.

 clink on this code: using System; public class HelloWorld {     public static void Main(string[] args)     {          for (int i = 1; i <= 5; i++)                {                    for (int j = i; j <=5; j++)                    {                        Console.Write(" ");                    }                    for (int k = 1; k <= i; k++)                    {                        Console.Write("*");                    }               ...

Check Average, Minimum, Maximum Marks Of Student Class Performance in c# Using Loop and If-Else.

Image
 CODE: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CP__TH__task {     class Program     {         static void Main(string[] args)         {               int max = 0, min = 0, avg = 0,tmk=0 ;             int n;             Console.WriteLine("Enter Number Of Student in Class");             n = int.Parse(Console.ReadLine());             for (int i = 1; i <= n; i++)             {                 Console.WriteLine("Enter Your Marks:");                 int m =Convert.ToInt32(Console.ReadLine());                 if (i==1)       ...

Finding Pythagoras Theorem in c# Using Switch-Case.

Image
  CODE: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CP__TH__task {     class Program     {         static void Main(string[] args)         { double p, h, b;             string choice;             Console.WriteLine("Enter what you want to find:");             Console.WriteLine("h is for Hypotenius ");             Console.WriteLine("b is for base");             Console.WriteLine("p is for perpendicular");                        choice = Convert.ToString(Console.ReadLine());             switch (choice)             {                 case...

Mart Payment system in c# and give discount to customer.

 CODE: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CP__TH__task {     class Program     {         static void Main(string[] args)         {             double payment, billamt=0, discount = 0,pamt, cnt = 0;             string rep;             do             {                 Console.WriteLine("Enter Amount OF Product:{0}",cnt+1);                 pamt = double.Parse(Console.ReadLine());                 billamt = billamt+ pamt;                                  cnt++;                 Con...