package 第三章;
import java.util.Scanner;
public class Tex中的引号 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in=new Scanner(System.in);
int q=1;
String str=in.nextLine();
int i=0;
while(i<str.length()) {
char c=str.charAt(i++);
if(c=='"')
{
// System.out.print("enter");
System.out.print(q==1?"“":"”");
q=-q;
}
else
{
System.out.print(c);
}
}
}
}
import java.util.Scanner;
public class Tex中的引号 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in=new Scanner(System.in);
int q=1;
String str=in.nextLine();
int i=0;
while(i<str.length()) {
char c=str.charAt(i++);
if(c=='"')
{
// System.out.print("enter");
System.out.print(q==1?"“":"”");
q=-q;
}
else
{
System.out.print(c);
}
}
}
}