Created
December 22, 2015 02:01
-
-
Save peter279k/a4e1f1e5b4bd227e2a6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class main{ | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
boolean check = false; | |
while(input.hasNext()) { | |
String str = input.nextLine(); | |
for(int i=0;i<str.length();i++) { | |
if(str.charAt(i) == '\"') { | |
if(check) { | |
check = false; | |
System.out.print("\'\'"); | |
} | |
else { | |
check = true; | |
System.out.print("``"); | |
} | |
} | |
else { | |
System.out.print(str.charAt(i)); | |
} | |
} | |
System.out.println(); | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment