Update searching_of_element_in_dynamic_Array.cpp

This commit is contained in:
faizan Ahamed 2020-04-21 01:03:38 +05:30 committed by GitHub
parent a3268742f3
commit 3621d2ee26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,12 +33,13 @@ The element is 5
*/
#include <iostream>
int main() {
long long int r, mr = 0, x, q, i, z;
int64_t r, mr = 0, x, q, i, z;
std::cout << "Enter Number of array you want to Store :";
std::cin >> x;
std::cout << "Enter Number of Question or Quary you want to do Related to Array :";
std::cin >> q;
//create a Array in run time because use can change the size of each array which he/she is going to store
// create a Array in run time because use can
// change the size of each array which he/she is going to store
// create a 2D array
int** ar = new int* [x]();
for (r = 0; r < x; r++) {
@ -55,7 +56,7 @@ std::cin >> ac[i];
ar[r] = ac;
}
for (z = 0; z < q; z++) {
long int r1 = 0, q1 = 0;
int64_t r1 = 0, q1 = 0;
std::cout << "enter the number of row which element You want to find :";
std::cin >> r1;
r1 = r1 - 1;