ABCDCBA
ABC CBA
AB BA
A A

Answer Posted / mathu

import java.io.*;

class MainAlpha{
public static void main(String args[])
{
for(int i=65;i<=67;i++){
System.out.printf("%c",i);
System.out.printf("\t");
}
System.out.print("");
for(int j=66;j>=65;j--){
System.out.printf("%c",j);
System.out.printf("\t");
}
System.out.println("");


for(int i=65;i<=66;i++){
System.out.printf("%c",i);
System.out.printf("\t");
}
System.out.print("\t");

for(int j=66;j>=65;j--){
System.out.printf("%c",j);
System.out.printf("\t");
}

System.out.println("");


for(int i=65;i<=65;i++){
System.out.printf("%c",i);
System.out.printf("\t");
}
System.out.print("\t");
System.out.print("\t");
System.out.print("\t");

for(int j=65;j>=65;j--){
System.out.printf("%c",j);
System.out.printf("\t");
}

}

}

Is This Answer Correct ?    2 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is identifiers in c with examples?

682


Is exit(status) truly equivalent to returning the same status from main?

592


Explain how do you determine whether to use a stream function or a low-level function?

635


Write a code on reverse string and its complexity.

616


What is keyword in c?

613






I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.

1912


What is structure padding in c?

633


I have a varargs function which accepts a float parameter?

587


What is the difference between typedef and #define?

552


What are preprocessor directives in c?

647


How do you convert strings to numbers in C?

721


Explain the use of 'auto' keyword

686


how to introdu5ce my self in serco

1531


What is the general form of a C program?

607


Why is #define used?

798