- 博客(13)
- 收藏
- 关注
原创 C++ - Class Template
Class Template Input Format The first line contains an integer n. Input will consist of n+1 lines where n is the number given in the first line of the input followed by n lines. Each of the next line contains the type of the elements provided and dependin
2021-02-05 20:45:51
155
原创 C++ - Queue Management (Part 2)
Queue Management We continue to develop our Queue management system that we made in the previous module. You are asked to add a new functionality: adding two queues together. The result should be a new queue, where the elements of the first queue come firs
2021-02-05 16:22:28
903
原创 C++ - Queue Management part 1
Queue Management You are working on a Queue management system and need to create the class to hold the queue data, which are customer IDs (integers). You make a Queue class, which has a size attribute, and an array, to hold the data of the queue. The class
2021-02-05 12:42:01
844
原创 C++ - Class
You have to create a class, named Student, representing the student’s details, as mentioned above, and store the data of a student. Create setter and getter functions for each element; that is, the class should at least have following functions: get_age, s
2021-02-04 21:02:44
263
原创 C++ - Classes and Objects
A class defines a blueprint for an object. We use the same syntax to declare objects of a class as we use to declare variables of other basic types. For example: Box box1; // Declares variable box1 of type Box Box box2; // Declare variabl
2021-02-04 19:40:07
277
原创 C++ - Strings
Input Format You are given two strings, and , separated by a new line. Each string will consist of lower case Latin characters (‘a’-‘z’). Output Format In the first line print two space-separated integers, representing the length of and respectively. In
2021-02-04 18:21:51
123
原创 Python - Print Function
Print Function The included code stub will read an integer n from STDIN. Without using any string methods, try to print the following: Input Format: The first line contains an integer . Output Format: Print the list of integers from through as a string,
2021-02-04 17:41:13
534
1
原创 C++ - Transportation
Transportation You are making a program for a bus service. A bus can transport 50 passengers at once. Given the number of passengers waiting in the bus station as input, you need to calculate and output how many empty seats the last bus will have. Sample I
2021-02-04 15:37:41
965
原创 C++ - Countdown
Countdown You need to make a countdown app. Given a number N as input, output numbers from N to 1 on separate lines. Also, when the current countdown number is a multiple of 5, the app should output “Beep”. Sample Input: 12 Sample Output: 12 11 10 Beep 9 8
2021-02-04 15:35:46
510
原创 C++ - Ticket Office
Ticket Office You are working on a ticketing system. A ticket costs $10. The office is running a discount campaign: each group of 5 people is getting a discount, which is determined by the age of the youngest person in the group. You need to create a progr
2021-02-04 15:34:26
1585
原创 C++ - Palindrome Numbers
Palindrome Numbers A palindromic number is a number (such as 626) that remains the same when its digits are reversed. Write a function that returns true if a given number is a palindrome, and false, if it is not. Complete the given function, so that the co
2021-02-04 15:32:32
437
原创 Python (Beginner) - Sum of Consecutive Numbers
Sum of Consecutive Numbers No one likes homework, but your math teacher has given you an assignment to find the sum of the first N numbers. Let’s save some time by creating a program to do the calculation for you! Take a number N as input and output the su
2021-02-04 15:29:22
505
原创 Python (Beginner) - Search Engine
Python(beginner) - Search Engine The given code takes a text and a word as input and passes them to a function called search(). The search() function should return “Word found” if the word is present in the text, or “Word not found”, if it’s not. Sample In
2021-02-04 15:20:39
516
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅