Advertisement
gosuodin

kiem tra chuoi doi xung

Jun 20th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. bool kiemtrachuoidoixung(char s[100]) {
  4. for (int i = 0; i < strlen(s); i++) {
  5. if (s[i] == s[strlen(s)-1]) {
  6. return 1;
  7. }
  8. else {
  9. return 0;
  10. break;
  11. }
  12. }
  13. }
  14. void main() {
  15. char s[100];
  16. cout << kiemtrachuoidoixung("aa");
  17.  
  18. system("pause");
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement