Hey Guys, if you want many more such tech educational videos on this channel then please support me by subscribing to this channel & also share it with your friends ✌
Write a menu based C++ program to do the following operations using dedicated user defined function for each operation. a) square of a number b) factorial of a number c) whether prime or not d) whether even or not e) whether palindrome or not Plz solve this 🙏🙏
Glad to hear that Kanak. Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
hey after we are done from the while loop and we start checking if the reverse is equal to our main number, why we didn't compare the num directly with the rev? why you assigned n to num the compare n to rev? I tried it and it gave me a wrong answer
Thanks Ronak. There's a scientific reason to not go with dark theme with doing video recording. That's because the text on dark theme is not as clear as text on white theme especially at lower resolutions. You can try to verify this. Personally I love dark theme myself. It's just not optimum for video recordings 😊
+Aryan Madhav Verma thank you so much buddy for such a positive feedback buddy. I'm sure you'll do great in your exam 😎✌😇 all the best and do share the videos with your friends so that it'll help them as well 😎
Hey, this tutorial is very helpful. But, how would we change the code if we want to use a negative number? Ex: if num = -121, then rev should equal 121-, and should output not palindrome.
Computer doesn't understand like human because as we know that the reverse number of 121 will be 121 But computer' result wil outcome By some mathmatics calculations....
Wow buddy, that you so much for such a wonderful response. I'm so happy to hear your positive feedback and to know that this video was informational for you. Do share the videos with your friends and contacts and keep sharing the knowledge buddy 😇
Sir, you could please make a video regarding palindorm in C++ using stack... and one issue with this code is that for the first time the result is correct but when I used do while loop for asking the user whether they want to repeat this process or not, for the second time the result is incorrect for the same palindrom number.
While solving for 202 in second iteration I got 10 and at the 3rd iteration I got 20, by 1 and 3 iteration by adding it will be 202 I guess but what about that 10?? at the second iteration
It should workout fine buddy. There's no alternative that I have tried but you can google palindrome program for C++ and you will get it. Also try downloading this Dev C++ IDE and try it there. I should work. Lastly you basically know the logic and algorithm of how it works right. So maybe you can try out some other possible combinations to see if it works. ✌
Hello, in the last iteration num=1 correct. so lets try and dryrun the part inside the loop. in the first line we have : digit = num%10. % sign is mod sign which will give us the remainder and not the quotient. so 1mod10 = 1 so digit = 1 now on the next like we have rev = (rev*10)+digit. rev was already 12 so multiplying it by 10 we get 120 and adding the digit variable which is 1 we will get rev=121 last statement is num = num/10 now / is for division so we get the quotient. num is 1. so 1/10 = 0. so the new num =0 so when the loop again tries to execute we have num=0 hence the loop execution stops as the while loop executes only till the num is not equal to 0. which means the moment num=0 the loop will stop iterating. thats why I didnt emphasize much on the last step
You're welcome buddy, happy to hear that this video helped you. Do share it with your friends and contacts so that even they get help from this video. ✌
Aisa Program type krne k kya faida jo read hi nai kiya ja sake. Bhai sahab apne jo program type kiya hai logon ko usko read krne me Microscope ka use krana prega.
Hey Guys, if you want many more such tech educational videos on this channel then please support me by subscribing to this channel & also share it with your friends ✌
,
Very good tutorial.This makes it very easy to understand how everything works.
Well efforts sir, I tried every video on youtube but I got this
why is "num" stored to another variable "n". Why cant we just use "if(num==rev)"???
Enjoying coding all because of your channel 😀
I have one doubt: Is '1001' is a palindrome (Note the single quotes before answering)?It would be very nice if you can show the program using strings.
Put it in the program 🤦
Write a menu based C++ program to do the following operations using dedicated user defined function for each operation.
a) square of a number
b) factorial of a number
c) whether prime or not
d) whether even or not
e) whether palindrome or not
Plz solve this 🙏🙏
Thanku I really understanded this concept thanks for this video 👍👍😊😊🤗
Glad to hear that Kanak. Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
Nice video ...concept was clear
Thank you so much buddy 😋😇 Happy to hear this from you. Please do share the video with your friends too ✌️
hey
after we are done from the while loop and we start checking if the reverse is equal to our main number, why we didn't compare the num directly with the rev? why you assigned n to num the compare n to rev?
I tried it and it gave me a wrong answer
Try to dry run the code step by step. take a pen and paper & note down all the variable values at each iteration to understand the full working. ✌
Also a do a program of array elements check palandrom or not
Really helpful, also a black background would have been better
Thanks Ronak. There's a scientific reason to not go with dark theme with doing video recording. That's because the text on dark theme is not as clear as text on white theme especially at lower resolutions. You can try to verify this. Personally I love dark theme myself. It's just not optimum for video recordings 😊
Plz upload videos for gross salary, percentage and number conversion (i e., 11th practical programs)🙇😋
You're going to make me top my cs exam 😂
+Aryan Madhav Verma thank you so much buddy for such a positive feedback buddy. I'm sure you'll do great in your exam 😎✌😇 all the best and do share the videos with your friends so that it'll help them as well 😎
Many Many Thanks 😍😍😍
Most welcome 😊✌️
HOW DO U INCREMENT REV BY ONE??
Well explained bro...
Glad you liked it. Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
Hey, this tutorial is very helpful. But, how would we change the code if we want to use a negative number? Ex: if num = -121, then rev should equal 121-, and should output not palindrome.
negative numbers are not palindrome
wtf is 121-
great work man
Thank you bro 😊. Please do share the videos with your friends too ✌️
Thanks Man.
Your are genius
Heheh not really but thanks I am flattered 😅😅 Please do share the videos with your friends too ✌
Computer doesn't understand like human because as we know that the reverse number of 121 will be 121
But computer' result wil outcome
By some mathmatics calculations....
You're a hero bro😊
Wow buddy, that you so much for such a wonderful response. I'm so happy to hear your positive feedback and to know that this video was informational for you. Do share the videos with your friends and contacts and keep sharing the knowledge buddy 😇
Dude instead of using while loop you can use stringrev
True that. Was trying to not use any inbuilt functions to explain actually how it works✌️😊
THANKS A LOT
You're welcome! Please do share the videos and channel with your friends too. Thats the biggest help and support you can give back to our channel!
Sir, you could please make a video regarding palindorm in C++ using stack...
and one issue with this code is that for the first time the result is correct but when I used do while loop for asking the user whether they want to repeat this process or not, for the second time the result is incorrect for the same palindrom number.
Nice! Thanks.
Most welcome buddy. Please do share the video with your friends 😇
u r great
You are awesome
Thank you
While solving for 202 in second iteration I got 10 and at the 3rd iteration I got 20, by 1 and 3 iteration by adding it will be 202 I guess but what about that 10?? at the second iteration
very good
Thank you so much 😊✌️
Please do share the videos with your friends too 😊
thnk you
Awesome!
+ayush sharma thank you so much for your positive response buddy ✌😇
This is a great video.....but when I tried it myself (C++ 4.5) I couldn't get desirable results. It says its not a palindrome. please help!
It should workout fine buddy. There's no alternative that I have tried but you can google palindrome program for C++ and you will get it. Also try downloading this Dev C++ IDE and try it there. I should work. Lastly you basically know the logic and algorithm of how it works right. So maybe you can try out some other possible combinations to see if it works. ✌
I downloaded dev c++ and it worked perfectly....thank u so much......
This prog doesn't work with 0 > numbers and numbers > =10**9, so i don't find it useful
Y you skipped last step 1%10 and directly told we will get some value and wrote reverse directly?
Hello, in the last iteration num=1 correct. so lets try and dryrun the part inside the loop.
in the first line we have :
digit = num%10.
% sign is mod sign which will give us the remainder and not the quotient. so 1mod10 = 1
so digit = 1
now on the next like we have rev = (rev*10)+digit.
rev was already 12 so multiplying it by 10 we get 120 and adding the digit variable which is 1 we will get
rev=121
last statement is num = num/10
now / is for division so we get the quotient. num is 1. so 1/10 = 0. so the new num =0
so when the loop again tries to execute we have num=0 hence the loop execution stops as the while loop executes only till the num is not equal to 0. which means the moment num=0 the loop will stop iterating.
thats why I didnt emphasize much on the last step
Thank youu🙏🙏
Most welcome Usha, please do share the videos with your friends too 😇
thx bhai jaan bachali
You're welcome buddy, happy to hear that this video helped you. Do share it with your friends and contacts so that even they get help from this video. ✌
Nice
Thank you so much ✌️
Why we consider the 10 number
Where exactly? We're dealing with the decimal number system that's why I guess.
Thanks
You're always welcome buddy ✌
Do share the video with your friends and contacts 😇
It doesn't work for bigger numbers like 123456787654321
Didn't got it
Why here we take value of 10
I need more help
What do you need?
👍👍
#eat #sleep n #code
Yes 😇
absolutely...
Hey I prepared a this program by using printf but every number it give not palindrome LOL ,🙄🙄
Aisa Program type krne k kya faida jo read hi nai kiya ja sake.
Bhai sahab apne jo program type kiya hai logon ko usko read krne me Microscope ka use krana prega.
check it for value 1234567899 ie 10^10
Thanks
Most welcome buddy :-)
I would request you to please share the video with your friends and contacts. That will be the best help :-)
Thanks
Welcome
thanks