A company is planning to provide an extra discount to its customers. every order has an order I'd associated with it which is a sequence of digits.the discount is calculated as the count of the unique repeating digits in the order I'd.
A company is offering a special discount to its customers based on an algorithm. Two range values are fed to the algorithm and in return t will calculate the discount to offer to the customers. The discount is calculated as the sum of all the prime numbers within the defined range including the range values if the range values are the prime numbers
Write an algorithm to find the special discount given to the customers
Input
The first line of the input consists of
an integer-rangelet remeng
the minimum boundary wabererte
given range finding the p
values)
Write a C program for File Operations to read a string from standard input and prints the entered string using fgets() and fputs() function.
Runtime Input :
Hai
Output :
Hai
Write an algorithm to find the special discount given to the customers
Find the Frequency of Characters. The string entered by the user is stored in variable str. Then, the user is asked to enter the character whose frequency is to be found and display.
Runtime Input :
ksrct r
Output :
1
The student detail of mark statement of one array to be copied into another array. The order of mark statement of second array should be opposite to those of first array. Write a C program to copy one array into another array using pointers.
Sample Testcase
Input :
5
15
25
35
45
55
Output :
55
45
35
25
15
The current selected programming
language is C. We emphasize the
submission of a fully working code
over partially correct but efficient
code, Once submitted, you cannot
review this problem again. You can
use printf() to debug your code. The
printff) may not work in case of
syntax/runtime error. The version of
GCC being used is 5.5.0
A company is planning to bucketize
its data to improve the search
operation. The data is a sequence of
digits [0-9]. The bucket ID is
calculated as the sum of all the prime
digits in the data. The prime number
is a number that is divisible only by
itself and 1.
Write an algorithm to find the bucket
ID for the data as the sum of all
prime digits in the data.
A company is offering a special discount to its customers based on an algorithm two range values are fed to the algorithm and in return it will calculate the discount to offer to the customers the discount is calculated as the sum of all.the prime numbers
Create a program based on the sample output using while loop.
Enter a Number : 10
1*2 = 2
2*4 = 8
3*6 = 18
4*8 = 32
5*10 = 50