Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int v[100];
- int n=0;
- void afis()
- {
- if(n==0)
- {
- return;
- }
- else if(n!=0)
- {
- cout<<v[n-1]<<" ";
- n--;
- afis();
- }
- }
- int main()
- {
- int x;
- while (x!=0)
- {
- cin>>x;
- v[n]=x;
- n++;
- }
- afis();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment