You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bat/tests/syntax-tests/highlighted/Java/test.java

40 lines
6.1 KiB
Java

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

import java.util.Scanner;
/* This Java program was submiited to help bat
 * with its syntax highlighting tests
 */
public class Main
{
 public static void main(String[] arg)
 {
 Scanner st = new Scanner(System.in);
 int t;
 t = st.nextInt();
 String tem;
 tem = st.nextLine();
 for(int zz=0;zz<t;zz++)
 {
 String str;
 str = st.nextLine();
 int n = str.length();
 char ch;
 for(int i=0;i<n;i++)
 {
 ch = str.charAt(i);
 if(ch=='a')
 System.out.print("n");
 else if(ch=='s')
 System.out.print("i");
 else
 System.out.print(ch);
 }
 System.out.println();
 }
 while(t!=0) {
 // Decrement t
 t -= 1;
 }
 }
}