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 -
Java 2021-09-16 07:44:02
find sum of first and last digits in java
public class Main { public static void main(String[] args) { System.out.println(sumFirstAndLastDigit(1221)); System.out.println(sumFirstAndLastDigit(2342)); System.out.println(sumFirstAndLastDigit(10)); System.out.pri... Add solution -
Javascript 2021-09-16 04:03:01
javascript function convert bytes into mb
function niceBytes(x){ const units = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; let l = 0, n = parseInt(x, 10) || 0; while(n >= 1024 && ++l){ n = n/1024; } return(n.toFixed(n < 10 && l > 0 ? 1 : 0) +... Add solution -
C 2021-09-15 22:59:02
Write a C program to search an existing element in singly linked list
#include <stdio.h> #include <stdlib.h> struct node { int num; struct node *nextptr; } stnode, *ennode; int FindElement(int); void main() { int n,i,FindElem,FindPlc; stnode.nextptr=NULL; ennode=&stnode; printf("\n\n Linked... Add solution -
Java 2021-09-15 05:20:02
Java program to print all armstrong numbers between given range
public class ArmstrongBetween1To1000 { public static void main(String[] args) { int number, n, total = 0; System.out.println("Armstrong number between 1 to 1000: "); for(int a = 1; a <= 1000; a++) { numb... Add solution
Best helpers
Ranking is empty