You are given a positive integer N. Your task is to find the number of positive integers K <= N such that K is not divisible by any of the following numbers 2, 3, 4, 5, 6, 7, 8, 9, 10.
In the given example,
11 is not divisible by any number from 2 to 10. It is divisible by only 1, 11.So, the output should be
2.
You are given two strings as input. Write a program to print the given two strings in reverse order separated by "---".
The first and second line of input are strings.
In the example, the given strings are
Apple, Banana. So now we have to reverse the order of strings to Banana, Apple and add a separation line between the two strings.So the output should be
Banana
---
Apple
A ticket selling booth in a cricket stadium, people has to buy the ticket from this booth to enter into the stadium. Price of the each ticket is Rs. 500. The booth keeps track of the number of people visited the stadium. Model this ticketing booth with a class called Counter A including following members Data members (i) Number of people visited (ii) Total amount money collected Member functions (i) To assign initial value (ii) To increment people total as well as amount total if a ticket is sold out. (iii) To display two totals Write a program to test this class.
Write a program that reads a single line of input and prints the first two and last two characters of the given input and prints the asterisk character (*) in place of the remaining characters.
For example, if the given string is
message, then the first two and last two characters are me, ge. Now replacing all the remaining characters with * will give the output me***ge.
professor chang wants a program that caculates and displays the are of a circle, given the circle's radius. the formula for calculating the area of a circle is πr^2, where π and r represents pi and the radius, respectively. the professor wants to use the value of pi reounded to two decimal places, which is 3.14
enter the first number, second number, and third number
calculate the sum by adding together the first number, second number, and third number
calculate the average by dividing the sum by 3
display the average