Hello everyone how are we all doing?
please i was given two assignment which am to submit in two days but it is a pain in the A... for me even though it seams so easy please i need help


Output the following figure with loop statement
*****
****
***
**
*
And here are my codes
{
for (int i=1;i<=5;i++)
{
for(int j=1;j<=5;j++)
{
if(j<i)
{
System.out.println();
}
else
{
System.out.print("*");
}
}
}
}
}


the second one says
(write the following if-else statement to switch statement

{
// TODO Auto-generated method stub

int score=80;
if(score>=90)
{
System.out.println("High Distinction");
}
else if(score>=80)
{

System.out.println("Distinction");
}
else if(score>70)
{
System.out.println("Credit");
}
else if(score>=60)
{
System.out.println("pass");
}
else

{
System.out.println("fail");
}
}
}

THANK YOU!