Closed Thejas0604 closed 11 months ago
This snippet can convert decimal into binary. To verify functionality follow these steps.
1. Add these lines above the snippet.
#include <iostream> using namespace std;
2. Add this function below the snippet.
int main() { // Binary numbers equivalant to first 10 decimal numbers for (int i = 0; i <= 10; i++) { cout << i << " : " << decimalToBinary(i) << endl; } return 0; }
Output
Thank you.
This snippet can convert decimal into binary. To verify functionality follow these steps.
1. Add these lines above the snippet.
2. Add this function below the snippet.
Output
Thank you.