1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
gulaghasi [49]
3 years ago
14

From your fist impression, write down what first comes to mind as to what is good and bad about the way the device works.

Computers and Technology
1 answer:
nalin [4]3 years ago
6 0

Answer:

xczczxczx

Explanation:

You might be interested in
22 POINTS IF YOU GET THIS RIGHTTTT<br><br> KACHOW!! Is a catchphrase used by?
dexar [7]
Lightning McQueen in the Disney movie, Cars

KACHOW
5 0
2 years ago
Read 2 more answers
Lian is asked to create a variable that will keep track of how many times the user has tried to enter their password. What kind
Kisachek [45]
What are the answers?

Hdhdhdgd. Oxide
4 0
2 years ago
Write a program that evaluates an arithmetic expression in postfix notation. The basic algorithm is contained in "Evaluating Pos
Ronch [10]

Answer:

#include<iostream>

#include<cctype>

#include<stack>

using namespace std;

// returns the value when a specific operator

// operates on two operands

int eval(int op1, int op2, char operate) {

switch (operate) {

case '*': return op2 * op1;

case '/': return op2 / op1;

case '+': return op2 + op1;

case '-': return op2 - op1;

default : return 0;

}

}

// evaluates the postfix operation

// this module neither supports multiple digit integers

// nor looks for valid expression

// However it can be easily modified and some additional

// code can be added to overcome the above mentioned limitations

// it's a simple function which implements the basic logic to

// evaluate postfix operations using stack

int evalPostfix(char postfix[], int size) {

stack<int> s;

int i = 0;

char ch;

int val;

while (i < size) {

ch = postfix[i];

if (isdigit(ch)) {

// we saw an operand

// push the digit onto stack

s.push(ch-'0');

}

else {

// we saw an operator

// pop off the top two operands from the

// stack and evalute them using the current

// operator

int op1 = s.top();

s.pop();

int op2 = s.top();

s.pop();

val = eval(op1, op2, ch);

// push the value obtained after evaluating

// onto the stack

s.push(val);

}

i++;

}

return val;

}

// main

int main() {

char postfix[] = {'5','6','8','+','*','2','/'};

int size = sizeof(postfix);

int val = evalPostfix(postfix, size);

cout<<"\nExpression evaluates to "<<val;

cout<<endl;

return 0;

}

or else you can try even this

#include <iostream.h>

#include <stdlib.h>

#include <math.h>

#include <ctype.h>

const int MAX = 50 ;

class postfix

{

private :

int stack[MAX] ;

int top, nn ;

char *s ;

public :

postfix( ) ;

void setexpr ( char *str ) ;

void push ( int item ) ;

int pop( ) ;

void calculate( ) ;

void show( ) ;

} ;

postfix :: postfix( )

{

top = -1 ;

}

void postfix :: setexpr ( char *str )

{

s = str ;

}

void postfix :: push ( int item )

{

if ( top == MAX - 1 )

cout << endl << "Stack is full" ;

else

{

top++ ;

stack[top] = item ;

}

}

int postfix :: pop( )

{

if ( top == -1 )

{

cout << endl << "Stack is empty" ;

return NULL ;

}

int data = stack[top] ;

top-- ;

return data ;

}

void postfix :: calculate( )

{

int n1, n2, n3 ;

while ( *s )

{

if ( *s == ' ' || *s == '\t' )

{

s++ ;

continue ;

}

if ( isdigit ( *s ) )

{

nn = *s - '0' ;

push ( nn ) ;

}

else

{

n1 = pop( ) ;

n2 = pop( ) ;

switch ( *s )

{

case '+' :

n3 = n2 + n1 ;

break ;

case '-' :

n3 = n2 - n1 ;

break ;

case '/' :

n3 = n2 / n1 ;

break ;

case '*' :

n3 = n2 * n1 ;

break ;

case '%' :

n3 = n2 % n1 ;

break ;

case '$' :

n3 = pow ( n2 , n1 ) ;

break ;

default :

cout << "Unknown operator" ;

exit ( 1 ) ;

}

push ( n3 ) ;

}

s++ ;

}

}

void postfix :: show( )

{

nn = pop ( ) ;

cout << "Result is: " << nn ;

}

void main( )

{

char expr[MAX] ;

cout << "\nEnter postfix expression to be evaluated : " ;

cin.getline ( expr, MAX ) ;

postfix q ;

q.setexpr ( expr ) ;

q.calculate( ) ;

q.show( ) ;

}

6 0
3 years ago
When you take a long trip, you should drive for no more than ______ in a day
Vanyuwa [196]
The answer is C


Hope this helps
3 0
3 years ago
Consider the problem of making change for n cents using the fewest number of coins. Assume that each coins value is an integer.
Oksana_A [137]

Answer:

There are two algorithms in which apply different optimal solutions.

They are: A Dynamic and Naive recursive programs

Explanation:

// A Naive recursive C++ program to find minimum of coins  

// to make a given change V  

#include<bits/stdc++.h>  

using namespace std;  

// m is size of coins array (number of different coins)

int minCoins(int coins[], int m, int V)  

{  

// base case  

if (V == 0) return 0;  

// Initialize result

int res = INT_MAX;  

// Try every coin that has smaller value than V  

for (int i=0; i<m; i++)  

{  

if (coins[i] <= V)  

{  

 int sub_res = minCoins(coins, m, V-coins[i]);  

 // Check for INT_MAX to avoid overflow and see if  

 // result can minimized

 if (sub_res != INT_MAX && sub_res + 1 < res)  

  res = sub_res + 1;  

}  

}  

return res;  

}  

// Driver program to test above function  

int main()  

{  

int coins[] = {9, 6, 5, 1};  

int m = sizeof(coins)/sizeof(coins[0]);  

int V = 11;  

cout << "Minimum coins required is "

 << minCoins(coins, m, V);  

return 0;  

}  

.........................................

// A Dynamic Programming based C++ program to find minimum of coins  

// to make a given change V  

#include<bits/stdc++.h>  

using namespace std;  

// m is size of coins array (number of different coins)  

int minCoins(int coins[], int m, int V)  

{  

// table[i] will be storing the minimum number of coins  

// required for i value. So table[V] will have result  

int table[V+1];  

// Base case (If given value V is 0)  

table[0] = 0;  

// Initialize all table values as Infinite  

for (int i=1; i<=V; i++)  

 table[i] = INT_MAX;  

// Compute minimum coins required for all  

// values from 1 to V  

for (int i=1; i<=V; i++)  

{  

 // Go through all coins smaller than i  

 for (int j=0; j<m; j++)  

 if (coins[j] <= i)  

 {  

  int sub_res = table[i-coins[j]];  

  if (sub_res != INT_MAX && sub_res + 1 < table[i])  

   table[i] = sub_res + 1;  

 }  

}  

return table[V];  

}  

// Driver program to test above function  

int main()  

{  

int coins[] = {9, 6, 5, 1};  

int m = sizeof(coins)/sizeof(coins[0]);  

int V = 11;  

cout << "Minimum coins required is "

 << minCoins(coins, m, V);  

return 0;  

}  

5 0
3 years ago
Other questions:
  • Which of the following accurately completes this sentence? The Internet is ____.
    6·2 answers
  • The four functions of a computer are
    5·1 answer
  • In 4-bit sign magnitude representation, what is the binary encoding of the number -5?
    15·1 answer
  • If you touch a downed powerline covered or bare, what's the likely outcome
    5·1 answer
  • Chemical equations of Carbon + water​
    14·1 answer
  • Write a cout statement so the variable sales is displayed with a precision of three decimal places, with the decimal point alway
    12·1 answer
  • Which line of code in this program is MOST likely to result in an error
    15·2 answers
  • We cannot imagine a life without the Internet. Imagine that you had to live without being connected to the Internet. Discuss the
    13·1 answer
  • SHA-1 produces a(n) ___________-bit message digest, which can then be used as an input to a digital signature algorithm.
    5·1 answer
  • Write a function called mul_time that takes a Time_Elapsed object and a number and returns a new Time_Elapsed object that contai
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!