What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-08-31 21:05:02
php multibyte string shuffle
php > $string = "Pretend I'm multibyte!"; php > $len = mb_strlen($string); php > $sploded = array(); php > while($len-- > 0) { $sploded[] = mb_substr($string, $len, 1); } php > shuffle($sploded); php > echo join('', $splode... Add solution -
Python 2021-08-31 15:50:01
Write a pseudo code for generating a fibonacci series starting with 0 and 1 for 10 values using while loop.
#Python program to generate Fibonacci series until 'n' value n = int(input("Enter the value of 'n': ")) a = 0 b = 1 sum = 0 count = 1 print("Fibonacci Series: ", end = " ") while(count <= n): print(sum, end = " &quo... Add solution -
Shell/Bash 2021-08-31 14:43:03
C program to design a digital clock
#include <stdio.h> #include <time.h>//for sleep() function #include <unistd.h> #include <stdlib.h> int main() { int hour, minute, second; hour=minute=second=0; while(1) { //clear output screen system("clear"); //print ti... Add solution -
Java 2021-08-31 04:38:02
4 digit armstrong number in java
// Check whether a given number is armstrong number or not import java.util.Scanner; public class ArmstrongNumber { public static void main(String[] args) { int x, y, z = 0, temp; Scanner sc = new Scanner(System.in); System.out.pri... Add solution -
TypeScript 2021-08-30 23:21:02
how to take inputs and give outputs from a file in c
#include<stdio.h> int main() { FILE *fp; char ch; fp = fopen("one.txt", "w"); printf("Enter data..."); while( (ch = getchar()) != EOF) { putc(ch, fp); } fclose(fp); fp = fopen(&q... Add solution -
C++ 2021-08-30 00:06:02
find all occurrences of a substring in a string c++
#include <string> #include <iostream> using namespace std; int main() { string s("hello hello"); int count = 0; size_t nPos = s.find("hello", 0); // first occurrence while(nPos != string::npos) { ... Add solution
Best helpers
Ranking is empty