New course! Every coder should learn Generative AI!
Try a free lessonQ&A Discussions
[SOLVED]Explain the output?
8 Votes
5 AnswersPlease... Explain...
0 Votes
2 Answers#include <iostream>
#include <bitset>
int main()
{
int myDecimalNumber;
std::cin >> myDecimalNumber;
std::string binary = std::bitset<8>(myDecimalNumber).to_string(); //to binary
std::cout<<binary<<"\n";
unsigned long decimal = std::bitset<8>(binary).to_long();
std::cout<<decimal<<"\n";
return 0;
}
2 Votes
5 Answerswhy is it giving n??
0 Votes
2 AnswersPlz explain output?
0 Votes
2 AnswersPlease Helpp
1 Vote
1 AnswerC#.net datatype
0 Votes
1 AnswerHot today
Html img
2 Votes
Am new in learning programming
0 Votes
Where do i write my code?
0 Votes
Popsicles
0 Votes
I'm new in learning programming
0 Votes
Weird Floating Point operation
0 Votes
Input Mismatch Error in Java
0 Votes
When using boolean operators in python, what is the point of using Unicode or "ASCII" in a string?
1 Votes
how do i load the Apl
0 Votes