fork(1) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int main() {
  5. string in;
  6. while(getline(cin,in)){
  7. int len=in.length();
  8. int i=0;
  9. while(i<len){
  10. if( in[i]=='<'){
  11. cout<<in[i];
  12. i++;
  13. while(in[i]!='>'){
  14. if(in[i]=='"'){
  15. cout<<in[i];
  16. i++;
  17. while(in[i]!='"') {
  18. cout<<in[i];
  19. i++;
  20. }
  21. cout<<in[i];
  22. }
  23. else if('a'<=in[i] && in[i]<='z')
  24. cout<<char(in[i]-32);
  25. else
  26. cout<<in[i];
  27. i++;
  28. }
  29. cout<<in[i];
  30. }
  31. else
  32. cout<<in[i];
  33. i++;
  34. }
  35. cout<<endl;
  36. }
  37. return 0;
  38. }
Success #stdin #stdout 0s 15232KB
stdin
<html>
<head>
<TITLE>To jest tytul</Title>
</head>
<body>
<b>Cos tam</b>
</body>
</html>
stdout
<HTML>
<HEAD>
<TITLE>To jest tytul</TITLE>
</HEAD>
<BODY>
<B>Cos tam</B>
</BODY>
</HTML>