Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main ()
- {
- int i,q,x,k,p,min;
- q=0;
- p=0;
- cout<<"k=";
- cin>>k;
- for (i=1;i<=k,i++;)
- {
- do
- {
- cout<<"x=";
- cin>>x;
- if (x!=0) p=x;
- if (p<x) p=min;
- }
- while (x!=0);
- }
- cout<<min;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement