UVA Solution 272 - TEX Quotes - Solution in C++ | Volume 2
UVA Online Judge Solution 272 - TEX Quotes | Volume 2
UVA Problem Link - 272 - TEX Quotes https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=4&page=show_problem&problem=208
Problem Name: 272 - TEX Quotes
Problem Number : UVA - 272 - TEX Quotes
Online Judge : UVA Online Judge Solution
Volume: 2
Solution Language : C plus plus
UVA Solution 272 - TEX Quotes Code in CPP:
#include<stdio.h> int main() { char s[10001]; int i, flag = 0; while(gets(s)) { for(i = 0; s[i]; i++) { if(s[i] == '\"') { if(!flag) { printf("``"); } else printf("''"); flag = 1 - flag; } else putchar(s[i]); } puts(""); } return 0; }
No comments:
Post a Comment