Skip to main content

WAP to display selected days of week

 using System;

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace selected_days
{
Class Program
{
static void main(string[] args)
{
int weeknumber;
Console.WriteLine("Enter week number (1-7):");
switch (weeknumber)
{
case 1:
Console.WriteLine("Sunday");
break;
case 2:
Console.WriteLine("Monday");
break;
case 3: 
Console.WriteLine("Tuesday");
break;
case 4:
Console.WriteLine("Wednesday");
break;
case 5:
Console.WriteLine("Thursday");
break;
case 6:
Console.WriteLine("Friday");
break;
case 7:
Console.WriteLine("Saturday");
break;
}
Console.ReadLine();
}
}
}




OUTPUT:
Enter week number (1-7):
5
Thursday












Comments

Popular posts from this blog

Laws of motion

  Newton's Laws of motion Newton's first law of  motion: It states that ,"everybody in this universe continues its state of rest or of uniform motion in a straight line unless an external force is acted upon it. According to this law a body cannot change its state by itself. The property of a body due to which it cannot change its state by itself is called inertia. So Newton's first law of motion is also called law of inertia. From first  law of motion, a body cannot change its state by itself. some external agency is required to change the state of a body. The external agency which changes the state of a body is called force. Thus, Newton's first law gives definition of force. Mathematically, Newton's first law of motion can be expressed as  For F=0  ,    v= constant. Linear momentum The product of mass and velocity of a body is called its momentum. It is a vector quantity and denoted by p i.e  P= mv Its SI unit is kgm/s

Physical variables and transducer

unit 3 Physical Variables and transducers  Sensor Sensors are electrical devices that have the capability of sensing different physical variables. The sensor may be classified on different bases one of them is a physical quantity. Hence on the basis of a physical quantity or physical vibration involved the sensors are classified as: Resistive sensor  The input being measured is transformed into a change in resistance. examples: potentiometer, resistance thermometer, strain gauge, etc. Inductive sensor The input being measured is transformed into a change in resistance. example LVDT. Capacitive Sensor The input being measured is transformed into a change in capacitance. example: capacitive Displacement sensor. On the basis of power supply required: Active Sensor Active sensors are those which do not require an external power supply.  example: thermo-couple Passive Sensor Passive Sensors are those which require a power supply. example: Potentiometer. Physical variables and ...