Question:
You are given a string . Suppose a character ‘a’ occurs consecutively n times in the string. Replace these consecutive occurrences of the character ‘a’ with (n, ‘a’) in the string.
Input Format: A single line of input consisting of the string .
Output Format: A single line of...
Question:
Thinking how to add space stations as background when score reaches 200 as level 2?
...
Question:
We have learned how to make the pirate ship looping left and right, try the following:
How to make the pirate ship move and bounce diagonally when it reaches the edge ( the pirate ship image is 200px by 166px)
...
Question 1:
Use while loop (NOT for loop) to create the multiplication table program. After asking which table the user wants, ask her how high the table should go. The output should look like this:
Sample Input:
Which multiplication table would you like? 7
How high do you want to go? 12
Sample Output:
Here’s your table:
7...
Question:
Write a function luckySum(a, b, c) to calculate sum of given 3 int values, a b c. The function will have a return value of their sum. However, if one of the values is 13 then it does not count towards the sum and values to its...
Question: (floyd-warshall)
There are N players in Dota team.
This year’s The Weekend Battle Cup is coming, and Jack want to select some excellent player to attend the contest. There have been M matches since the last few days(No two players will meet each other at two...