SarthakKeshari / CPP-Questions-and-Solutions

This repository aims to solve and create new problems from different spheres of coding. A path to help students to get access to solutions and discuss their doubts.
MIT License
47 stars 132 forks source link

Minimum cost to reach the destination #379

Closed PrakharRathore123 closed 2 years ago

PrakharRathore123 commented 2 years ago

Issue Id you have worked upon -

376

Briefly explain your program logic -

1)Function to calculate minimum from 3 numbers 2)If given x and y coordinates are negative then return max number as the given number is negative. 3)If given x and y coordinates are zero 4)For given x and y coordinates calculate the minimum cost

Screenshots(Attach 2 screenshots of your own input and output) -

Attach here

MINCOST1 MINCOST2


Checklist:

Eg - If your code follow the below guidelines. Kindly change [] to [x]

All the conditions should be fulfilled for considering your code for merging -

PrakharRathore123 commented 2 years ago

@SarthakKeshari Kindly acknowledge this pull request.