write a program to accept 10 integers to an array and perform the below actions
1) Print the elements in descending order
2) find the Min value, Max value entered
3) print the the sum we get after adding all the numbers in the array
Instructions:
Example:
Enter string: Philippines
Instructions:
Given code:
#include <iostream>
using namespace std;
int main() {
// NOTE: Do not change this
const char others[100] = "TheQuIckBrownFoxJumpedOvErTheLazyDog";
char myself;
// TODO: Ask the user for the value of `myself`
}
Sample input:
Enter myself: T
26
by CodeChum Admin
I always want to look at the positive side of things, so I decide to seriously look at positive numbers, too!
Will you code along with me?
Instructions:
Input
Multiple lines containing an integer on each.
2
3
4
-1
-5
1
0Output
A line containing an integer.
10The outer if-else statement checks the type of day, and the nested if-else statements check the hour of travel.
True
False
Make a list contain any 4 names and also using for loop to print this list and please print the last string in the list
A number is Expensive if the number of digits of its prime factorization (including exponents greater than 1) is greater than the total digits of the number itself. Given an integer Implement a function that returns a string: If the number of digits of the prime factorization (including exponents greater than 1) is equal to the number of digits of N print Equal If the number of digits of the prime factorization (including exponents greater than 1) is lower than the number of digits of N print Cheap print None of the above if none of the two above conditions is true
Yash has a sequence of 26 distinct integers P = (P₁, P2, ..., P26)
consisting of integers from 1 to 26. He constructs a string
S following the below rule:
• For every i where (1 <=i<= 26), the i-th character of
S is the lowercase English letter at comes P₁-th in
alphabetical order.
Your task is to output the resultant string S
Proper Fractions
Given 2 fractional values A/C. B/D where A, B are numerators and C. D are denominators. You are asked to add two fractional values. If the sum gives proper fraction as output print the proper fraction. If it is improper, convert it into a mixed fraction and print it. If it is a whole number, print it.
Input
The first line of input contains two space-separated strings A/C &B/D
Output
The output should be a string of format p/q if the result is a proper fraction
a b/c if the result is a improper or med fraction
a if the result is a whole number
Discount Sale
It is a Summer Discount sale in Mumbai and all the local shops have put up various offers. Arjun selected N items to buy. While standing in the billing queue, he noticed the offer "Buy two! Get two FREE!!". This means that for every two items he buys, they give him two items for free. However, items can be of varying prices, they always charge for the two most costly items and give the other two as free. For example, if the items cost 1, 1, 2, 2, then you have to pay four rupees and take all four items.
Arjun is confused with grouping his items to reduce the total price ho has to pay. Your task is to find the minimum price Arjun has to pay to buy all the N items.