"I LOVE MY COUNTRY"
write a c program to get "COUNTRY MY LOVE I" as the output.
Use any other programming language. It is not mandatory to
use C.
Answer Posted / debmalya paul
package Stringmltp;
import java.util.Scanner;
public class country {
static Scanner in=new Scanner(System.in);
void rev()
{
String s=in.nextLine();
System.out.print(s.substring(10,17) +" "+ s.substring(7,9) +" "+ s.substring(2,6) +" "+ s.substring(0,1));
}
public static void main(String []args)
{
country cn=new country();
cn.rev();
}
}
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
How to delete a node from linked list w/o using collectons?
What is a program flowchart?
Explain what is the best way to comment out a section of code that contains comments?
What is a stream water?
What is c language and why we use it?
What is the difference between abs() and fabs() functions?
What is exit() function?
Can you please explain the scope of static variables?
What does the characters “r” and “w” mean when writing programs that will make use of files?
How can I find the modification date and time of a file?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
How do I get an accurate error status return from system on ms-dos?
Describe how arrays can be passed to a user defined function
What is the correct declaration of main?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????