Reverse Each Word

2

1 votes
Easy
Problem

Given a string S, reverse each word of a string individually. For eg. if a string is "abc def", reversed string should be "cba fed".
Input Format :

String S

Output Format :

Updated string

Constraints :
1 <= Length of S <= 1000
Sample Input :

Welcome to Punjab Engineering College

Sample Output:

emocleW ot bajnuP gnireenignE egelloC

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?