Computer Science, asked by srinidhireddy9991b, 10 months ago

Having crossed the three-headed dog, Harry, Ron, and Hermoine went through a secret trap door in search of Sorcerer's stone. On the way, they passed through a room and found that the room has only one door opposite to them and the door through which they entered has shut once they entered the room. The door was very large with a four digit number imprinted on it. When Harry and Ron tried to open it by casting out spells, it didn't open. Having tried various spells both of them got fed up and they left the task to Hermoine. Hermoine on curiously observing the room found that a statement was written on the top of the room. It was written as follows "I will be always four" “I can only be opened when you add my first and last and enter it” “If you find a sign, you should not consider it” Help Hermoine break the code and open the door so that they can save the sorcerer's stone.

Answers

Answered by Dilkashnaaz2208
2

Answer:

bro its so long...

Explanation:

paragraph is so long....

Answered by tejasreeaudurada10
12

Answer:

#include<iostream>

using namespace std;

int main()

{

int n,x,y;

std::cin<<n;

x=n%10;

y=n/1000;

std::cout>>x+y;

}

Explanation:

It is very easy when we read the vast paragraph easily!!

Here we need to make the 4 digit pin and notice that the first and last digits should sum up.

Hence we can get first digit by dividing with 1000 and last digit by modulo operator for remainder.

adding first and last digits ,we can get the result:)

Similar questions