Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include "iostream"
- #include "iomanip"
- #include "math.h"
- using namespace std;
- int _tmain(int argc, _TCHAR* argv[])
- {
- int i,s,p,k,l,m;
- char mas[1000];
- char mas1[1000];
- char mas2[1000];
- i=p=l=m=s=0;
- cout << "Enter k: ";
- cin >> k;
- cout << "Enter mas[k]: ";
- for (i=0;i<k;i++)
- {
- cin >> mas[i];
- //mas[i]=l;
- if (isdigit(mas[i])) {mas1[s]=mas[i]; cout«mas1[s]; s++;}
- else {mas2[p]=mas[i]; p++;};
- }
- while (l<=p)
- {
- cout<<mas2[l];
- l++;
- }
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment