"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
What oops means?
How do I get an accurate error status return from system on ms-dos?
Why use int main instead of void main?
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
Can stdout be forced to print somewhere other than the screen?
What is a pointer in c?
difference between native and cross compilers
Why do we write return 0 in c?
what is the different bitween abap and abap-hr?
What is realloc in c?
What is "Duff's Device"?
How can variables be characterized?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
explain how do you use macro?