Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- unsigned int i;
- string st;
- cout<<"vvedite stroku - St"<<endl;
- getline(cin,st);
- int f=0,s=0;
- int n=st.length();
- int now=0;
- for(int i=0;i<n;i++)
- {
- if(st[i]=='/')
- now=1;
- else if(now==0)
- {
- f=f*10+(st[i]-'0');
- }
- else
- {
- s=s*10+(st[i]-'0');
- }
- }
- int a=f/s;
- cout<<a;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement