A company is planning to provide an extra discount to it's customers. Every order has an order ID associated with it which is a sequence of digits. The discount is calculated as the count of unique repeating digits in the order ID. Write a code to find the discount percentile given to the customers.
Rewrite the following expressions using an if...else statement. (Assume that all variables are declared properly.)
a. (x < 5) ? y = 10 : y = 20;
arjun has two strings s and t he can do following operation at most once
You are given m*n matrix and k write a program to compute the area of submatrix
String encoding
A shifted to right by 1 b
If abc shifted to ijk according to input is yes other wise no
Which of the following apply to the while loop only? To the do...while loop only? To both?
a. It is considered a conditional loop.
b. The body of the loop executes at least once.
c. The logical expression controlling the loop is evaluated before the loop is
entered.
d. The body of the loop may not execute at all.
Suppose that x, y, and z are int variables, and x = 10, y = 15, and z = 20. Determine whether the following expressions evaluate to true or false:
a. !(x > 10)
b. x <= 5 || y < 15
c. (x != 5) && (y != z)
d. x >= z || (x + y >= z)
e. (x <= y - 2) && (y >= z) || (z - 2 != 20)
Suppose that x, y, and z are int variables, and x = 10, y = 15, and z = 20. Determine whether the following expressions evaluate to true or false:
a. !(x > 10)
b. x <= 5 || y < 15
c. (x != 5) && (y != z)
d. x >= z || (x + y >= z)
e. (x <= y - 2) && (y >= z) || (z - 2 != 20)
Problem Statement:
Jack and his three friends have decided to go for a trip by sharing the expenses of the
fuel equally. Implement a C# method Calculate CostPerPerson(double mileage,
double amountPerLitre, int distanceOne Way) which returns the amount (in Rs) each
of them need to put in for the complete (both to and fro) journey.
Which of the following apply to the while loop only? To the do...while loop only? To both?
a. It is considered a conditional loop.
b. The body of the loop executes at least once.
c. The logical expression controlling the loop is evaluated before the loop is
entered.
d. The body of the loop may not execute at all.