The answer, according to my knowledge, is (d) <em>pronunciation.</em>
<em />
<em>- Lee Hae :) Have a great day!</em>
Answer:
Required code is given below.
Best Regards,
Please ask if any queries.
Explanation:
#include <stdio.h>
#include <string.h>
int main(void)
{
char input[100];
printf("Enter desired auto service:\n");
scanf ("%[^\n]%*c", input);
printf("You entered: %s\n",input);
if(strcmp(input,"Oil change") == 0){
printf("Cost of oil change: $35\n");
}
else if(strcmp(input,"Tire rotation") == 0){
printf("Cost of tire rotation: $19\n");
}
else if(strcmp(input,"Car wash") == 0){
printf("Cost of car wash: $7\n");
}
else{
printf("Error: Requested service is not recognized\n");
}
return 0;
}
<h2>Please wait until more research is discovered...</h2>
Question
A size of a jumbo candy bar with rectangular shape is l x w x h. Due to rising costs of cocoa, the volume of the candy bar is to be reduced by p%.
To accomplish this, the management decided to keep the height of the candy bar the same, and reduce the length and width by the same amount.
For example, if l = 12, w = 7, h = 3, and p = 10, then the new dimension of the candy bar is 11.39 x 6.64 x 3.
Below is an example of how the completed program should work:
Enter the length, width, and height of the candy bar separated by space(s): 12 7 3
Enter the amount of the reduced volume as a percentage: 10
The new dimensions of the candy bar is: 11.38 x 6.64 x 3.00
Format your output with setprecision(2) to ensure the proper number of decimals for testing!
Primary storage refers to your RAM it is internal storage.
Secondary storage is any storage that is not the primary storage that permanently stores data. Examples are hard drive, tape disk drive, floppy disk drive and compact disk drive.
Off-line storage refers to any device that stores data that is not permanently attached to the computer. Example flash drives, The data remains on the storage device and can be connected to a different computer.
A string parameter and returns new string with all the letters of the alphabet that are not in the argument string. The letters in the returned string should be in alphabetical order. The implementation should uses a histogram from the histogram function
Explanation:
The below code is written in python :
alphabet = "abcdefghijklmnopqrstuvwxyz"
test_dups = ["zzz","dog","bookkeeper","subdermatoglyphic","subdermatoglyphics"]
test_miss = ["zzz","subdermatoglyphic","the quick brown fox jumps over the lazy dog"]
def histogram(s):
d = dict()
for c in s:
if c not in d:
d[c] = 1
else:
d[c] += 1
return d
def has_duplicates(s):
for v in histogram(s).values():
if v > 1:
return True
return False
def test_dups_loop():
for s in test_dups:
print(s + ':', has_duplicates(s))
def missing_letters(s):
r = list('abcdefghijklmnopqrstuvwxyz')
s = s.lower()
for c in s.lower():
if c in r:
r.remove(c) # the first matching instance
return ''.join(r)
def test_miss_loop():
for s in test_miss:
print(s + ':', missing_letters(s))
def main():
test_dups_loop()
test_miss_loop()
if __name__ == '__main__':
main()