Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

How to execute this using vector



#include <iostream>


bool doesexists(int array[], int toseaarch, int size);



const short int SIZE = 10;



int main() {


int myarray[SIZE], distinct_ctr = 0, index = 0;



std::cout << "Enter 10 numbers: ";



for (index = 0; index < SIZE; index++) {


int tmp;


std::cin >> tmp;



if (!doesexists(myarray, tmp, SIZE)) {


myarray[distinct_ctr] = tmp;


distinct_ctr++;


}


}



std::cout << "distinct numbers are: ";


for (index = 0; index < distinct_ctr; index++)


std::cout << myarray[index] << " ";



std::cout << "\n";



return 0;


}



bool doesexists(int array[], int toseaarch, int size) {


for (int index = 0; index < size; index++) {


if (toseaarch == array[index])


return true;


}


return false;


}

Write the array implemention of binary search tree.


Write the following functions :


1)insert


2)delete


3)search


4)display



Note:


No global declarations


Test run in main

Write a program in c++ that initiative an array of given 10 real numbers. The program should sort the number in awaiting / descending order using bubble sort method. It should print the given list as well as sorted list


The tap code, sometimes called the knock code, is a way to encode text messages on a letter-by- letter basis in a very simple way. Tap code has been one of the most basic communication protocols and still used to convey SOS messages and other urgent communication. The tap code uses a 5×5 grid of letters representing all the English alphabets, see Figure 1. To communicate the word "water", the cipher would be the following (with the pause between each number in a pair being shorter (single space) than the pause between letters (two spaces)),

Your task is to design a program that can

i) convert any given string into a Tap code sequence

Prototype: char* convertToTapCode(char*)

ii) and A Tap code sequence to a string (char*)

Prototype: char* convertToString(char*)


Note: You are not authorized to use string data type; however, you can use char*


Addition of Big Integer

In this problem, you have to take two char arrays of numbers (e.g., “1203009954” and

“109876201453”) from the user and add these two numbers and store answer in a third char array digit by digit (“111079211407”).

char* additionOfBigInteger(char * Num1, char* Num2)


Subtraction of Big Integer

In this problem, you have to take two char arrays of numbers (e.g., and “1203009954”

“109876201453”) from the user and subtract these two numbers and store answer in a third char array digit by digit (“-108673191499”).

char* subtractionOfBigInteger(char * Num1, char* Num2)


Multiplication of Big Integer

In this problem, you have to take two char arrays of numbers (e.g., and “1203009954”

“109876201453”) from the user and multiply these two numbers and store answer in a third char array digit by digit (“132182164055668263162”).

char* multiplicationOfBigInteger(char * Num1, char* Num2)



Write a C++ recursive function PrintPattern1 to print following pattern using recursion. No

loops allowed whatsoever, and you can write other helping (recursive) functions. For example, calling your function with these argument PrintPattern1(1,10) should print following pattern. Your function prototype must be as follows:

void PrintPattern1(int start, int end);

pattern:

*

*

*

*

*

*

*


A student is given a specific alphabet T in 2D and would have to output the alphabet T and make it rotate in 360 degrees clockwise.


Define a struct , FruitType, to store the following data about a fruit: Fruit name (string), color (string), fat (int), sugar ( int ), and carbohydrate (int). Now write a program that implements the struct FruitType, then include two functions. One function must ask the user to input the data about the fruit. The other function must output the data bout the fruit.

The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound.

1. Declare a const named CENTS_PER_POUND and initialize with 25.

2. Get the shipping weight from user input storing the weight into shipWeightPounds.

3. Using FLAT_FEE_CENTS and CENTS_PER_POUND constants, assign shipCostCents with the cost of shipping a package weighing shipWeightPounds.


Addition of Big Integer

In this problem, you have to take two char arrays of numbers (e.g., “1203009954” and

“109876201453”) from the user and add these two numbers and store answer in a third char array

digit by digit (“111079211407”).

function prototyoe:char* additionOfBigInteger(char * Num1, char* Num2)


Subtraction of Big Integer

In this problem, you have to take two char arrays of numbers (e.g., and “1203009954”

“109876201453”) from the user and subtract these two numbers and store answer in a third char

array digit by digit (“-108673191499”).

function prototyoe:char* subtractionOfBigInteger(char * Num1, char* Num2)


Multiplication of Big Integer

In this problem, you have to take two char arrays of numbers (e.g., and “1203009954”

“109876201453”) from the user and multiply these two numbers and store answer in a third char array digit by digit (“132182164055668263162”).

function prototyoe:char* multiplicationOfBigInteger(char * Num1, char* Num2)


LATEST TUTORIALS
APPROVED BY CLIENTS