Given a string, write a program to print a secret message that replaces characters with numbers 'a' with 1, 'b' with 2, ..., 'z' with 26 where characters are separated by '-'.
Note: You need to replace both uppercase and lowercase characters. You can ignore replacing all characters that are not letters.
Input:-
The input will be a string in the single line containing spaces and letters (both uppercase and lowercase).
Output:-
The output should be a single line containing the secret message. All characters in the output should be in lower case.
For Example -
Input 1:-
python
Output 1:-
16-25-20-8-15-14
Input 2:-
Foundations
Output 2:-
6-15-21-14-4-1-20-9-15-14-19
Input 3:-
python learning
Output 3:-
16-25-20-8-15-14 12-5-1-18-14-9-14-7
When we give three Inputs one by one they can give exact three Outputs must be come when code can be executed
Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (and hopefully funny) ways. Complete the program to read the needed values from input, that the existing output statement can use to output a short story.
#include <iostream>
using namespace std;
int main() {
cout << "name";
string location;
int number;
string pluralNoun;
cout << name << " went to " << location << " to buy " << number << " different types of " << pluralNoun << "." << endl;
return 0;
}
ANG IYONG KAPALARAN sa 2030 PROGRAM
Create a list with following items:
(Pwede mong dagdagan ang items)
Then the program should ask for your name and birth year and compute your age. The program should display the randomly picked item on list.
Note: Do not use random.choice() function
Sample output:
Enter your name: Carlo
Enter your Birth Year: 1999
Carlo, Ang iyong edad ay 31 at Ikaw ay Sinungaling parin sa 2030
Problem 1:
Create 2 virtual dice. Roll both dice, display the random value of each, and display the result.
Sample output:
First dice: 3
Second dice: 6
You got 9
Design a GPA calculator in which the student is allowed to enter maximum of 5 courses along with the course grade. The program should output the final GPA based on the scale below.
90-100 Excellent A 4.00
87-89 Very Good A- 3.75
84-86 Good B+
3.35 80-83 B 3.00
77-79 B- 2.75 74-76
Satisfactory C+ 2.50 70-73 Average C 2.00 67-69 Below Average
C- 1.75 64-66 Poor
D+ 1.50 60-63 D 1.00
<60 Fail F 0.00
Design a GPA calculator in which the student is allowed to enter maximum of 5 courses along with the course grade. The program should output the final GPA based on the scale below.
Write a program to accept two numbers at a time from the user. The product of the numbers is to be calculated and displayed. The user should then be prompted to indicate if they want to enter another pair of numbers.
Write a program to accept two numbers at a time from the user. The product of the numbers is to be calculated and displayed. The user should then be prompted to indicate if they want to enter another pair of numbers. As long as they enter ‘y’ at the prompt they should be allowed to enter another pair of numbers. Any other entry from the user at the prompt will result in them not being able to enter any more numbers.
Write the definition of a class WeatherForecast that provides the following behavior (methods):
No constructor need be defined. Be sure to define instance <span style="text-decoration-line: none;">variables</span> as needed by your "get"/"set" methods.