What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-09-16 11:06:04
Print Decimal to binary using stack
#include<iostream> #include<stack> using namespace std; void dec_to_bin(int number) { stack<int> stk; while(number > 0) { int rem = number % 2; //take remainder numbe... Add solution -
C++ 2021-09-16 08:24:02
enum in c++
#include <iostream> enum Example :unsigned char // char will work but float will not work because it is not an interger { A = 9, B = 56, c = 12//values must be integers };//enum is a just a name for a group of numeric values int main() { Example ... Add solution -
C++ 2021-09-15 20:07:02
reads the string in then determines if the string is a palindrome.
#include <iostream> using namespace std; // Iterative function to check if given string is a palindrome or not bool isPalindrome(string str) { int low = 0; int high = str.length() - 1; &n... Add solution