write a java program to display the following pattern:
*#*#*
*#*#
*#*
*#
*
please answer without using scanner class and just do a desk check and execute in bluej before answering....thanks in advance
Answers
The given problem is solved using Java.
1. Using nested loop.
public class Pattern{
public static void main(String s[]){
for(int i=5;i>0;i--){
for(int j=1;j<=i;j++){
if(j%2==0)
System.out.print("#");
else
System.out.print("*");
}
System.out.println();
}
}
}
2. Using 1 loop.
public class Pattern{
public static void main(String s[]){
for(int i=5;i>0;i--)
System.out.println("*#*#*".substring(0,i));
}
}
*#*#*
*#*#
*#*
*#
*
See attachment for verification.
Answer:
An antibody, also known as an immunoglobulin, is a large, Y-shaped protein used by the immune system to identify and neutralize foreign objects such as pathogenic bacteria and viruses. The antibody recognizes a unique molecule of the pathogen, called an antigenAn antibody, also known as an immunoglobulin, is a large, Y-shaped protein used by the immune system to identify and neutralize foreign objects such as pathogenic bacteria and viruses. The antibody recognizes a unique molecule of the pathogen, called an antigen