Update priya.cpp

Added new method to file
Merge pull request #1 from priyanka-bhavari/r2

Update priya.cpp