The table given below shows the list of gases, liquids and solids. By entering the substances, find the state of the material. Implement the above logic through C++. [Note: Use call by value]
S.No.
Materials
1
Water
2
Oxygen
3
Gold
4
Ice
5
Petrol
Write a program that print the second last digit of the given number. The second last digit is being referred to the digit in the tens place in the given number.
For example, if the given number is 197, the second last digit is 9.
Note 1 - The second last digit should be returned as a positive number. i.e. if the given number is -197, the second last digit is 9.
Note 2 - If the given number is a single-digit number, then the second last digit does not exist. In such cases, the program should print -1. i.e. if the given number is 5, the second last digit should be print as -1
String Slicing
Given two strings
Sample Input 1
JavaScript
S
Sample Output 1
Script
Sample Input 2
Language
air
Sample Output 2
Language
Trekking Kit
function Trekking(kit, item) {
this.kit = kit;
this.item = item;
}
function main() {
const item = readLine();
const trekkingKit = {
ruckSackBag : true,
clothes: ["Shirt", "T-Shirt/Full sleeves","Jeans"],
firstAid: true,
waterBottle: "2 liters",
sunGlasses: "UV Protection",
headTorch: true,
medicines: true,
footWear: "Non-skid",
food: ["dry fruits", "nuts", "chocolate bars"]
};
/* Write your code here */
}
Sample Input 1
ruckSackBag
Sample Output 1
true
Sample Input 2
surfboard
Sample Output 2
false
i want code in between write code here
Create a struct Rectangle where a rectangle is defined by Length & Width. Each
Rectangle has an area and perimeter. You can also compare two rectangles with
respect to the area.
Unite Family
Given three objects
SampleInput 1
{'surname' : 'Williams', 'city': 'Columbia'}
{'dish': 'cakes'}
{'pet': 'Rocky'}
Sample Output 1
Mr and Mrs Williams went to a picnic in Columbia with a boy and a pet Rocky. Mrs Williams made a special dish "cakes"Sample Input 2
{'surname' : 'Jones', 'city': 'Los Angeles'}
{'dish': 'puddings'}
{'pet': 'Peter'}
Sample Output 2
Mr and Mrs Jones went to a picnic in Los Angeles with a boy and a pet Peter. Mrs Jones made a special dish "puddings"
Write a function that, when you call it, displays a message telling how many times it has been called: “I have been called 3 times”, for instance. Write a main()program that calls this function at least 10 times. Try implementing this function in two different ways. First, use a global variable to store the count. Second, use a local static variable. Which is more appropriate? Why can’t you use a local variable.
Array of Strings to UpperCase
Given an array
Sample Input 1
[ 'book', 'table', 'strawberries', 'lemons' ]
Sample Output 1
[ 'BOOK', 'TABLE', 'STRAWBERRIES', 'LEMONS' ]
Sample Input 2
[ 'my best friend', 'florida', 'winter' ]
Sample Output 2
[ 'MY BEST FRIEND', 'FLORIDA', 'WINTER' ]
Population
Write a program that will predict the size of a population of organisms. The program should ask the user for the starting number of organisms, their average daily population increase (as a percentage*), and the number of days they will multiply. A loop should display the size of the population for each day.
Write a program that will predict the size of a population of organisms. The program should ask the user for the starting number of organisms, their average daily population increase (as a percentage*), and the number of days they will multiply. A loop should display the size of the population for each day.
In addition to passing the Mimir test cases know that I will view your code to ensure you have the correct functions and that your code writes to a file.
Your code should include the following functions
Write a class C2 that inherits all the functionality of A2 and B2,
// with the same stipulation that it should take f() from A2 and g() from B2.