fork(3) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp9
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int s = 0;
  14. while (s < 10000)
  15. {
  16. string input = Console.ReadLine();
  17. string[] html = input?.Split('<', '>');
  18. //Console.WriteLine(html[2]);
  19.  
  20.  
  21. string result = string.Empty;
  22. int i = 0;
  23. foreach (string word in html)
  24. {
  25. if (!String.IsNullOrWhiteSpace(word))
  26. {
  27. if (i % 2 != 0)
  28. {
  29. result += '<';
  30. result += word.ToUpper();
  31. result += '>';
  32. }
  33. else
  34. {
  35. result += word;
  36. }
  37. }
  38. i++;
  39. }
  40.  
  41. Console.WriteLine(result?.ToString());
  42. s++;
  43. }
  44.  
  45. }
  46.  
  47.  
  48.  
  49.  
  50. }
  51. }
  52.  
Runtime error #stdin #stdout #stderr 0.01s 134848KB
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>
stderr
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at ConsoleApp9.Program.Main (System.String[] args) [0x000a1] in <189fd33e60db4c45bf91a6dfca0689f7>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at ConsoleApp9.Program.Main (System.String[] args) [0x000a1] in <189fd33e60db4c45bf91a6dfca0689f7>:0