In Progress

Minimum of stack

#include <iostream>

#include <string>

using namespace std;

struct stack {

​int arr[5];

​int top;

} s;

void push(stack & s, int x);

void min(stack s);

int main()

{

​int k;

​[url removed, login to view] = -1;

​bool n = true;

​while (n)

​{

​​int m;

​​cin >> m;

​​switch (m)

​​{

​​case 1:

​​​cin >>k;

​​​push(s, k);

​​​break;

​​case 2:

​​​min(s);

​​​break;

​​default: break;

​​}

​​cout << " \n Do you want to cotin....? press 1 or 0" << endl;

​​cin >> n;

​}

}

void push(stack & s, int x)

{

​if ([url removed, login to view] == 4)

​{

​​return;

​}

​else

​{

​​s.top++;

​​[url removed, login to view][[url removed, login to view]] = x;

​}

}

void min(stack s)

{

​int z;

​if ([url removed, login to view] == -1)

​{

​​cout << "error";

​}

​else

​{

​​z = [url removed, login to view][0];

​​for (int i = 0; i<[url removed, login to view]; i++)

​​{

​​​if ([url removed, login to view][i] < z)

​​​{

​​​​z = [url removed, login to view][i];

​​​}

​​}

​}

​cout << "min is " << z;

}

Skills: Academic Writing

See more: I want to use a word press, I want to use a word press platform, I want to use a word press platform. I want you to base the design around the logo, min stack python, min stack interview question, min stack java, find max element in stack, get minimum element from stack geeksforgeeks, min stack interviewbit, min stack c++, design a stack that supports push, pop, top, and retrieving the minimum element in constant time., Re-design the website. https://www.tracksidepowersports.com/home.html I want to use a word press platform. I want you to base t, This project is ending in 5 days and has an average bid price of €21.00 EUR., Write a public class method chopMiddle that accepts a String parameter with 5 integers in it separated by commas (e.g. “1,2,3,, error 5, vba error 5, Polynomial Regression on Simulation Data • Function: y = 5 − 0.1x + 0.004x 2 − 3 × 10−5x 3 + . • Generate 50 traini, writer's rates for press releases, outsource your life to overseas virtual assistants for $5 per hour and do whatever you want, submit jquery validate php return error

About the Employer:
( 0 reviews ) Egypt

Project ID: #15681336

Awarded to:

dsourajit

A proposal has not yet been provided

$55 USD in 3 days
(0 Reviews)
0.0

2 freelancers are bidding on average $63 for this job

$70 USD in 3 days
(1 Review)
1.7