What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-03-25 00:00:15
how to use array without size in c++
#include <iostream> int main() { //Create a user input size int size; std::cout << "Enter Size Of Array : "; std::cin >> size; //Create the array with the size the user input int *myArray = new int[size]; //Populate t... Add solution -
Java 2022-03-01 19:40:04
add each element in an array java
import java.util.Arrays; import java.util.Scanner; public class SumOfElementsOfAnArray { public static void main(String args[]){ System.out.println("Enter the required size of the array :: "); &nbs... Add solution -
Java 2021-11-18 20:22:24
convert hashset to array
// First of all, you shouldn't use raw types. // Use : Set<Integer> set = new HashSet<>(); set.add(4); set.add(1); // Then convert to array : Integer[] arr = x.toArray(new Integer[set.size()]); // Using x.toArray() would give you an Object[]. Add solution -
C++ 2021-11-13 01:16:11
heap sort heapify and max heap in binary tree
Implementation of heap sort in C: #include <stdio.h> int main() { int heap[10], array_size, i, j, c, root, temporary; printf("\n Enter size of array to be sorted :"); scanf("%d", &array_size); printf("\n Ent... Add solution -
TypeScript 2021-11-08 14:06:20
in another method display sum of elements in different arrays in c#
using System; public class funcexer5 { public static int Sum(int[] arr1) { int tot=0; for (int i = 0;i < arr1.Length; i++) tot += arr1[i]; return tot; } public static void Main() { int[] arr1... Add solution