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

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:

  1. Ask the user for a string input
  2. From the string inputted, find the index of the capital letter.
  3. For this problem, it is guaranteed that there is only 1 capital letter in the inputted string.
  4. Hint: Use the isupper(char) function from the cctype library to check if a letter is capital or not.

Example:

Enter string: Philippines



Instructions:

  1. Check if the value of the char named myself is equal to one of the characters present in the string called others.
  2. Do this by comparing each of the characters in the string to myself.
  3. Print out only the index of the character which matches that of myself. If there are several matches, separate them by a single line.

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


Gathering Positivity

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:

  1. Using the do…while() loop, continuously scan for random integers, but add up only all the positive integers and store the total in one variable.
  2. The loop shall only be terminated when the inputted integer is zero. Afterwards, print out the total of all inputted positive integers.

Input

Multiple lines containing an integer on each.

2
3
4
-1
-5
1
0

Output

A line containing an integer.

10




The 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.

LATEST TUTORIALS
APPROVED BY CLIENTS