Guest User

Untitled

a guest
Jun 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. s = listBox1->Items[i];
  2.  
  3. for (int i = 0; i < listBox1->Items->Count; i++) {
  4. string s;
  5. int a, b;
  6. s = listBox1->Items[i];
  7. a = stoi(s.substr(0, s.find('/')));
  8. b = stoi(s.erase(0, s.find('/') + 1));
  9. label1->Text += a/b;
  10. }
  11.  
  12. s = listBox1->Items[i]->ToString();
  13.  
  14. String^ s = listBox1->Items[i]->ToString();
  15. array<String^>^ splitted = s->Split('/');
  16. int a = int::Parse(splitted[0]);
  17. int b = int::Parse(splitted[1]);
  18. label1->Text += (a/b).ToString();
Add Comment
Please, Sign In to add comment