Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Napisz program który po wpisaniu wyrazu – wypisze go od ostatniej litery do pierwszej.
- #include <iostream>
- using namespace std;
- int main ()
- {
- char wyraz[20] = {};
- cout<<"uzytkownik wpisze wyraz a program wyswietli go od tylu."<<endl;
- cout<<"wpisz wyraz: ";
- cin>>wyraz;
- // char znak_koncowy='\0';
- for (int i=19; i>=0; i--)
- {
- if(wyraz[i]!='\0')
- cout<<wyraz[i];
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement