fork(1) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string Tvalue1 = "0";
  8. string Tvalue2 = "0";
  9. string Tvalue3 = "0";
  10. for (int i = 0; i < 3; i++)//here 3 is gridview row length
  11. {
  12. string x = "1:1:1";//This your cell value
  13. int n = 3;
  14. string[] xxA = new string[n];
  15. xxA[i] = x;
  16. //Here is the some logic's for the calculation and formating
  17. string[] Cx1 = xxA[i].Split(':');
  18. Tvalue1 = (Convert.ToInt32(Tvalue1) + Convert.ToInt32(Cx1[0])).ToString();
  19. Tvalue2 = (Convert.ToInt32(Tvalue2) + Convert.ToInt32(Cx1[1])).ToString();
  20. Tvalue3 = (Convert.ToInt32(Tvalue3) + Convert.ToInt32(Cx1[2])).ToString();
  21. }
  22. string FInalValue = Tvalue1 + ":" + Tvalue2 + ":" + Tvalue3;
  23. Console.Write(FInalValue);
  24. }
  25. }
Success #stdin #stdout 0.03s 33904KB
stdin
Standard input is empty
stdout
3:3:3