Show a class Run using static data members that contains the following data members The name of the runner The distance covered by a runner The class has the following member functions Get function to input runner name and distance Show function to display runner name and distance
Mr. Karan buys a lottery ticket. There are 5 numbers that are selected as winners in 5 regions. Check whether Mr. Karan won the lottery or not.
Requirements:
Create a class called DISTANCE with data members as feet (int) and inches (float), use parameterised constructor to get the input values of the data members. Write a function to display the output. Create another class called DIST_KM with a data member kilometre (float). Use a parameterized constructor to assign input and a function to display it. In the main function, write a menu-driven program with 1. Convert feet and inches into kilometres 2.Check whether both the distances are equal or not. For option 1, write the conversion function in the source class. For option 2, create a separate object to assign the kilometres and check the equality of distances by overloading the operator (==). [Note: 1 feet=0.00305km]
Abhinav and Anjali are playing the Tic-Tac-Toe game. Tic-Tac-Toe is a game played on a grid that's three squares by three squares. Abhinav is O, and Anjali is X. Players take turns putting their marks in empty squares. The first player to get 3 of her marks in a diagonal or horizontal, or vertical row is the winner. When all nine squares are complete, the game is over. If no player has three marks in a row, the game ends in a tie. Write a program to decide the winner in the Tic-Tac-Toe game.
#Write a C++ program that works exactly like strcnmp built-in function. It accepts two strings then it compares the two strings alphabetically considering number of characters to be compared, which is specified by the user. Define your function.
Print hello world
Two numbers are entered through the keyboard. Write a program to find the value of one number raised to the power of another.