What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-09-09 23:18:04
print a 4d vector in c++
// A recursive function able to print a vector // of an arbitrary amount of dimensions. template<typename T> static void show(T vec) { std::cout << vec; } template<typename T> static void show(std::vector<T> vec) { int size =... Add solution -
C++ 2021-09-09 08:38:01
ugly number code in c++
# include<iostream> using namespace std; int min(int x, int y, int z){ //find smallest among three numbers if(x < y){ if(x < z) return x; else &nbs... Add solution -
C++ 2021-09-09 07:12:02
how to replace an element in array in c++
#include<iostream> #include<bits/stdc++.h> using namespace std; int main(){ int arr[3] = {0,1,2}; cout << "Before update "<<arr[2]<<endl; arr[2]=1;//updating element cout <<"After update "<<... Add solution -
C++ 2021-09-09 04:29:02
run time calculator c++
#include <iostream> #include <fstream> #include "header.h" #include <queue> #include <bitset> using namespace std; bool checkInputFile(ifstream &input) { //checking if the file is found and opened or not. if (!inp... Add solution -
TypeScript 2021-09-09 00:21:02
how to find how many digits a number has in c++
#include <iostream> #include <cmath> unsigned int getNumberOfDigits (int i) { return i > 0 ? log10((double) i) + 1 : 1; } int main() { std::cout << "Number of digits: " << getNumberOfDigits(/*Example*/6738) <... Add solution