Leon3226

Untitled

Oct 23rd, 2014
139
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>;
  2. using namespace std;
  3. int main()
  4. {
  5. int i, k, numb, c;
  6. char h[100], nm;
  7. c = 1;
  8. cout << "Enter number of characters in array" << endl;
  9. cin >> numb;
  10. cout << endl << "Enter all the charachters of array" << endl;
  11. for (i = 0; i < numb; i++)
  12. cin >> h[i];
  13. for (nm = 'a'; nm <= 'z'; nm++)
  14. {
  15. for (i = 0; i < numb; i++)
  16. if (nm == h[i])
  17. {
  18. cout << c << ". " << h[i] << endl;
  19. c++;
  20. break;
  21. }
  22. }
  23. }
RAW Paste Data