Give the algorithm to convert the input dollars(s) into the equivalent peso. One dollar is approximately equal to 50.60 pesos. Then display the result.
Write a small program called window.cpp to calculate the cost of a rectangular window. The total cost of a window is based on two prices; the cost of the glass plus the cost of the metal frame around the glass. The glass is 50 cents per square inch (area) and the metal frame is 75 cents per inch (perimeter). The length and width of the window will be entered by the user. The user will also enter y or n, to indicate whether or not the customer wants delivery. If the customer wants the window delivered, there is an extra charge of $50. The output of the program should be the length and width (as entered by the user) and the total cost of the window, including delivery if requested.
A customer goes and purchases some items at A & R. The store is offering discount to their customers. If a customer spends less than a $100, he/she will only get 5%. If the customer spends $100 or more, but less than $200, he/she will get 10% discount. If the customer spends $200 or more, he/she will get 20% off. Read the amount the customer spent at A&R. Calculate and print the discount amount and the final price after the discount has been deducted.
Write a program to find whether character entered is a vowel or a consonant.
Create a program that will prompt the user to enter a number in the range 1-100 to find my favorite number. If the number is less than favorite number, print “Too low...guess again: ”. If the number is greater than favorite number, print “Too high...guess again: ”. Otherwise, indicate that the number entered is the correct favorite number. (use a constant)
The formula (A∨B) ∧ (¬B ∨C) simplifies down to which of the following when using Boolean algebra?
A. A ∧ C
B. A ∧ B ∨ C
C. A ∨ C
D. B
E. A ∧ ¬B ∨ C
A deduction of $20.00 is taken from the salary of an employee if the salary is less than $300.00 and a deduction of $30.00 if the salary is greater than or equal to $300.00. Input the salary and output the salary less the appropriate deduction.
let a and b be two linked lists. write a c function to create a new linked list that contain elements alternately from A and B, beginning with the first element of A. If you run out of the elements in one of the lists, then append the remaining elements of the other list to C.
Wave array
Time Limit: 2 sec
Memory Limit: 128000 kB
Problem Statement
Given an N size array of unique inyegers, your task is to print the array in a wave form, i. e a1 >= a2 <= a3 >= a4 <= a5.. . print the lexicographically smallest array possible.
Input
First line of input contains a single integer N, next line contains N space separated integers depicting the values of the array.
Constraints:-
1 < = N < = 100000
1 < = Arr[i] < = 1000000000
Output
Print the array in wave form as mentioned.
Example
Sample Input :-
5
2 1 3 5 4
Sample Output:-
2 1 4 3 5