Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuiteDiscussions Q&R
std::string
1 Vote
3 Réponseschar* vs std::string
0 Vote
1 Réponse#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 RéponsesAujourd'hui en vedette
Is the AI course worth the $49?
0 Votes
Notifications
6 Votes
Where to use
0 Votes
Coding path
0 Votes
How to win bits
1 Votes