Advertisement
ofeko1997

Untitled

Feb 15th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. string input = "AB-ABC-2-300A", output = "";
  2. int num = Convert.ToInt32(input[7]) + 1;
  3. for (int i = 0; i < 7; i++)
  4. {
  5. output = (output + (Convert.ToString(input[i])));
  6. }
  7. output = output + num;
  8.  
  9. for (int i = 8; i < input.Length; i++)
  10. {
  11. output = (output + (Convert.ToString(input[i])));
  12. }
  13. Console.WriteLine(output);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement