Assignemnt #36 Weekday Name
Code
///Name: Morgan Kaplan
///Period: 5
///Project Name: Weekday Name
///File Name: WeekdayName.java
public class WeekdayName
{
public static void main( String[] args )
{
int n=1;
if ( n==1 )
{
System.out.println( "It is a Sunday." );
}
n=2;
if ( n==2 )
{
System.out.println( "It is a Monday ." );
}
n=3;
if ( n==3 )
{
System.out.println( "It is a Tuesday ." );
}
n=4;
if ( n==4 )
{
System.out.println( "It is a Wednesday." );
}
n=5;
if ( n==5 )
{
System.out.println( "It is a Thursday." );
}
n=6;
if ( n==6 )
{
System.out.println( "It is a Friday." );
}
n=7;
if ( n==7 )
{
System.out.println( "It is Saturday" );
}
n=3;
if ( n==3 )
{
System.out.println( "Today is Tuesday" );
}
else
{
System.out.println( "error" );
}
}
}
Picture of Output