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

Add All_or_any.cpp #505

Closed ghost closed 2 years ago

ghost commented 2 years ago

Choose your form and fill it -

1. Form 1(C++ Solution contributors)

2. Form 2(C++ Documentation Contributors)


1) Form 1

Issue Id you have worked upon -

503

Briefly explain your program logic -

Initially, after taking the input for the number of values, that the user wants to check, I stored the array in s variable. After this, a loop checked if all the numbers are positive and then another nested loop checked for the number of palindrome numbers the array contains. If it contains at least one palindrome number, the output is True, otherwise False. Hence, in this way, I checked for both conditions.

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

image image


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 -


ghost commented 2 years ago

Please, check if something more to add or correct. After merging this, I will add the readme.md file staring the question.

ghost commented 2 years ago

where?

SarthakKeshari commented 2 years ago

where?

In your solution file

ghost commented 2 years ago

oh, okay i get it, u mean to write the code properly, so that it is easy to read.?

ghost commented 2 years ago

Done!

SarthakKeshari commented 2 years ago

oh, okay i get it, u mean to write the code properly, so that it is easy to read.?

No, Code organization is fine. Add comments to the code line that's it.

ghost commented 2 years ago

oh, with a bit explanation of code!

ghost commented 2 years ago

Done! Please check.