Guest User

Untitled

a guest
Nov 23rd, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int a = 0;
  7. char b ;
  8. do{
  9. cout <<"請輸入數字\n";
  10. cin >> b ;
  11. a = b + a ;
  12.  
  13. }while( b != 'x');
  14. cout << a ;
  15.  
  16. return 0 ;
  17. }
Add Comment
Please, Sign In to add comment