Write a c program that asks the user
to enter distance in KM and Petrol Price in Rs.
Program should compute estimated budget for
the travel distance (Assume your car covers 100
KM in 8 Liters of fuel). Program should run in a
loop and ask the user “Do you want to
continue?”. If user enters ‘y’ or ‘Y’ program
should repeat otherwise terminate.

Answers

Answer 1

Answer:

#include <stdio.h>

int main()  

{

int x;

float y;

printf("Input total distance in km: ");

scanf("%d",&x);

printf("Input total fuel spent in liters: ");

scanf("%f", &y);

printf("Average consumption (km/lt) %.3f ",x/y);

printf("\n");

return 0;

}


Related Questions

The trackpad/touchpad on my laptop is acting unusual. When I click on something or move to an area, it jumps or moves to another area. What would be a good troubleshooting step to try and resolve this issue?

a. Use a mouse instead

b. Remove all possible contact points, and test again while ensuring only a single contact point

c. Refer caller to user guides

d. increase the brightness of the display

Answers

Answer:

My best answer would be, "b. Remove all possible contact points, and test again while ensuring only a single contact point"

This is because usually when the cursor jumps around without reason, it's caused by the user accidentally hitting the mouse touchpad on his or her laptop while typing. ... Similarly, know that just because you have an external mouse attached to your laptop, the built-in mousepad is not automatically disabled.

Brainliest?

Describe the system unit​

Answers

Answer:

A system unit is the part of a computer that houses the primary devices that perform operations and produce results for complex calculations

Write an algorithm to solve general formula? ​

Answers

Answer:

2+2=4

Explanation:

simple math cause of that bubye

If you lose yellow from your printer, what would happen to the picture?

Answers

Answer:

The picture would be green.

#Write a function called find_median. find_median #should take as input a string representing a filename. #The file corresponding to that filename will be a list #of integers, one integer per line. find_median should #return the medi

Answers

Answer:

Explanation:

The following is written in Python. It takes in a file, it then reads all of the elements in the file and adds them to a list called myList. Then it sorts the list and uses the elements in that list to calculate the median. Once the median is calculated it returns it to the user. The code has been tested and the output can be seen in the image below.

def find_median(file):

   file = open(file, 'r')

   mylist = []

   for number in file:

       mylist.append(int(number))

   numOfElements = len(mylist)

   mylist.sort()

   print(mylist)

   if numOfElements % 2 == 0:

       m1 = numOfElements / 2

       m2 = (numOfElements / 2) + 1

       m1 = int(m1) - 1

       m2 = int(m2) - 1

       median = (mylist[m1] + mylist[m2]) / 2

   else:

       m = (numOfElements + 1) / 2

       m = int(m) - 1

       median = mylist[m]

   return median

print("Median: " + str(find_median('file1.txt')))

What type of program allows a user to copy or back up selected files or an entire hard disk to another storage medium?

Answers

Answer:

backup utility

Explanation:

Which of the following acronyms refers to a network or host based monitoring system designed to automatically alert administrators of known or suspected unauthorized activity?
A. IDS
B. AES
C. TPM
D. EFS

Answers

Answer:

Option A (IDS) is the correct choice.

Explanation:

Whenever questionable or unusual behavior seems to be detected, another alarm is sent out by network security equipment, which would be considered as Intrusion Detection System.SOC analysts as well as occurrence responders can address the nature but instead, develop a plan or take steps that are necessary to resolve it predicated on such notifications.

All other three alternatives are not related to the given query. So the above option is correct.

what is the difference between system software and application software

Answers

Explanation:

System software is meant to manage the system resources. It serves as the platform to run application software. Application software helps perform a specific set of functions for which they have been designed. Application software is developed in a high-level language such as Java, C++, .

Explanation:

Hope it's the write answer

Mario is giving an informative presentation about methods for analyzing big datasets. He starts with the very basics, like what a big dataset is and why researchers would want to analyze them. The problem is that his audience consists primarily of researchers who have worked with big data before, so this information isn’t useful to them. Which key issue mentioned in the textbook did Mario fail to consider?

Answers

Answer:

Audience knowledge level

Explanation:

The Key issue that Mario failed to consider when preparing for her presentation is known as Audience knowledge level.  

Because Audience knowledge level comprises educating your audience with extensive information about the topic been presented. she actually tried in doing this but she was educating/presenting to the wrong audience ( People who are more knowledgeable than her on the topic ). she should have considered presenting a topic slightly different in order to motivate the audience.

5 Write full forms of the following: CPU b. MHz с. СВТ d. CAI e. ICU f. POS a. Write suitable technical term for the following statements. The continuously working capacity of computer without loos its speed and accuracy. b. The computer terminology, in which output is determined accord to the input The computer device used in hospitals that helps to main heartbeat of the patient. Opiemak The collection of eight bits or two Nibbles. C. I byte d. ng School Level Computer Science - 6​

Answers

Answer:

CPU = Central prossing Unit

Write a program palindrome.py that prompts for a sequence of words or numbers on a single line and checks if the entries are palindromes or not. A word or a number is a palindrome if it remains unchanged when reversed. e.g. rotor is a palindrome; but python is not a palindrome. e.g. 737 is a palindrome; but 110 is not a palindrome. The program receives the sequence as input and returns True if an entry is a palindrome or False if an entry is not a palindrome. Print the boolean value on one line. Print the palindromes count on the next line.

Answers

Answer:

Explanation:

The program first asks the user for the sequence of words. Then it splits the sequence into an array of words. Then it loops through the array checking each word to see if it is a palindrome. If it is it prints the word, the boolean value, and adds 1 to the palindrome_count variable. Otherwise it prints the word, false, and moves on to the next word in the list. Finally, it prints out the total value of palindrome_count.

word = input("Enter sequence of words: ")

word_list = word.split(' ')

print(word_list)

palindrome_count = 0

for word in word_list:

   print('\n\n')

   reverse = word[::-1]

   if word == reverse:

       print(word, end='\n')

       print(True, end="\n")

       palindrome_count += 1

   else:

       print(word, end='\n')

       print(False, end='\n')

print("\n\nNumber of Palindromes in Sequence: " + str(palindrome_count))

What are the differences between sequential and random files? Which one do you think is better and why?

Answers

Answer:

Sequential is better

Explanation:

Sequential is more organized while the more easier to make but less dependable one is random.

sequential is used for things such as date of birth, or where someone was born.

you can't do that with a random file.

An error due to wrong input by the user

Answers

Answer:

when did it take place..

Hi ! How can you return the value of the class computeDiscountInfo to the variable savings in the main class ?

Here is my code :

import java.util.Scanner;
public class RoomCost{
public static void main (String [] args){
double price;
double discount;
double savings;

Scanner keyboard = new Scanner(System.in);
System.out.print("Enter cutoff price for discount $>> ");
price = keyboard.nextDouble();
System.out.print("Enter discount rate as a whole number >> ");
discount = keyboard.nextDouble();
displayinfo();
//insert code to set the value returned from computeDiscountInfo method to savings);
// savings =
System.out.println("Special this week on any room over " + price);

System.out.println("Discount of " + discount + " percent");

System.out.println("That's a savings of at least $" + savings);
}
public static void displayinfo(){
System.out.println("We want your stay to be memorable.");

System.out.println("We promise to make you as comfortable as possible.");

}
public static double computeDiscountInfo(double price, double discountRate)

{

double savings;

//(insert code to calculate savings as price multiplied by discount divided by 100);
savings = (price * discountRate)/100;
return savings;
}


}

Answers

Answer:

savings = computeDiscountInfo(price, discount);

Explanation:

First of all computeDiscountInfo is a function, not a class.

You can call this function and assign its return value to a variable, savings in this example.

Shawn's supervisor has tasked him with determining how the company can increase the security of its Wi-Fi. Shawn plans to present several options to his supervisor and ask her to check his work. Which of the following is not a strong security method? (Select TWO.)
a. Disabling SSID
b. WPS
c. MAC filtering
d. Setting encryption

Answers

Answer:

The not strong security methods are:

a. Disabling SSID

b. WPS

Explanation:

When you disable SSID, you only make your Wi-Fi secure for the less determined attackers.  By disabling the SSID (network name), those who are less technically inclined are prevented from connecting to the network but, this will not deter a more determined and technically savvy adversary.  The best two options are MAC filtering and setting encryption.  WPS (Wi-Fi Protected Setup) enables the process of connecting to a secure wireless network from a computer or other device easier instead of making it harder.

a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less than 100. End each prompt with newline Ex: For the user input 123, 395, 25, the expected output is:Enter a number (<100):Enter a number (<100):Enter a number (<100):Your number < 100 is: 25

Answers

Answer:

Explanation:

import java.util.Scanner;  

//Declare the class NumberPrompt.  

public class NumberPrompt  

{  

  public static void main(String args[])  

  {  

       /*Declare the variable of scanner class and allocate the  

       memory.*/  

       Scanner scnr = new Scanner(System.in);  

       

       //Initialize the variable userInput.  

       int userInput = 0;

       /* Your solution goes here*/

       //Start the do-while loop

       do

       {

         //Prompt the user to enter the number.

         System.out.println("Enter a number(<100)");  

         

         /*Store the number entered by the user in the

         variable userInput.*/

         userInput=scnr.nextInt();

           

       }while(userInput>=100);/*Run the do-while loop till the    

       user input is greater than 100*/  

       

       //Print the number which is less than 100.

       System.out.println("Your number <100 is "+userInput);

       return;

  }

}

Output:-

Write a program to print all odd numbers between 20 and 50(Qbasic)​

Answers


Source Code:

total = 0

FOR x = 20 TO 50 STEP 2
total = total + x
NEXT x

PRINT "Total=";total

6. It is now one of the most popular forms of entertainment, and there will always
be a need for such devices.
omotor​

Answers

Answer:

then where is question ??????

Write a program that repeatedly accepts as input a string of ACGT triples and produces a list of the triples and the corresponding amino acids, one set per line. The program will continue to accept input until the user just presses ENTER without entering any DNA codes.

Answers

Answer:

Explanation:

The following code is written in Python. I created a dictionary with all the possible gene combinations and their corresponding amino acids. The user then enters a string. The string is split into triples and checked against the dictionary. If a value exists the gene and amino acid is printed, otherwise an "Invalid Sequence" error is printed for that triple. The program has been tested and the output can be seen in the attached image below.

def printAminoAcids():

   data = {

       'TTT': 'Phe', 'TCT': 'Ser', 'TGT': 'Cys', 'TAT': 'Tyr',

       'TTC': 'Phe', 'TCC': 'Ser', 'TGC': 'Cys', 'TAC': 'Tyr',

       'TTG': 'Leu', 'TCG': 'Ser', 'TGG': 'Trp', 'TAG': '***',

       'TTA': 'Leu', 'TCA': 'Ser', 'TGA': '***', 'TAA': '***',

       'CTT': 'Leu', 'CCT': 'Pro', 'CGT': 'Arg', 'CAT': 'His',

       'CTC': 'Leu', 'CCC': 'Pro', 'CGC': 'Arg', 'CAC': 'His',

       'CTG': 'Leu', 'CCG': 'Pro', 'CGG': 'Arg', 'CAG': 'Gln',

       'CTA': 'Leu', 'CCA': 'Pro', 'CGA': 'Arg', 'CAA': 'Gln',

       'GTT': 'Val', 'GCT': 'Ala', 'GGT': 'Gly', 'GAT': 'Asp',

       'GTC': 'Val', 'GCC': 'Ala', 'GGC': 'Gly', 'GAC': 'Asp',

       'GTG': 'Val', 'GCG': 'Ala', 'GGG': 'Gly', 'GAG': 'Glu',

       'GTA': 'Val', 'GCA': 'Ala', 'GGA': 'Gly', 'GAA': 'Glu',

       'ATT': 'Ile', 'ACT': 'Thr', 'AGT': 'Ser', 'AAT': 'Asn',

       'ATC': 'Ile', 'ACC': 'Thr', 'AGC': 'Ser', 'AAC': 'Asn',

       'ATG': 'Met', 'ACG': 'Thr', 'AGG': 'Arg', 'AAG': 'Lys',

       'ATA': 'Ile', 'ACA': 'Thr', 'AGA': 'Arg', 'AAA': 'Lys'

   }

   string = input("Enter Sequence or just click Enter to quit: ")

   sequence_list = []

   count = 0

   gene = ""

   for x in range(len(string)):

       if count < 3:

           gene += string[x]

           count += 1

       else:

           sequence_list.append(gene)

           gene = ""

           gene += string[x]

           count = 1

   sequence_list.append(gene)

   for gene in sequence_list:

       if gene.upper() in data:

           print(str(gene.upper()) + ": " + str(data[gene.upper()]))

       else:

           print(str(gene.upper()) + ": invalid sequence")

printAminoAcids()

what are the draw backs of the third generation computer​

Answers

Answer:

They are quite expensiveThey have the disadvantage of requiring cooling for their mainframe computers  integral components cannot be repaired once damagedintegrated components require advanced knowledge to service

with the aid of examples explain the differences between open source software and licensed software​

Answers

Answer:

Explanation:

Source is when a company go no limits to run the software but can easily be taken done by a complaint or two or a bug while a licensed it a protected version of the software.

Write a class of complex numbers consisting of:
-Properties:
• Real part of type double;
• Virtual part of type double.
- Method:
• default constructor, 2-parameter constructor;
• Full setter, getter for each variable;
• the print() function prints SoPhuc as a string in the format a + bi, where a is the real part, b is the imaginary part
-Write main() function:
• Create 2 SoPhuc objects
• Use class methods to enter information for 2 objects
• Use print() method to print information of 2 objects that have been created

Answers

Answer:

hi sorry for not knowing the answer

but please follow have a great day,night, or afternoon

A company is deploying NAFDs in its office to improve employee productivity when dealing with paperwork. Which of the following concerns is MOST likely to be raised as a possible security issue in relation to these devices?
A. Sensitive scanned materials being saved on the local hard drive
B. Faulty printer drivers causing PC performance degradation
C. Improperly configured NIC settings interfering with network security
D. Excessive disk space consumption due to storing large documents

Answers

Answer:

D. Excessive disk space consumption due to storing large documents.

Explanation:

When a company is planning to use NAFDs in its office rather than paper work, the efficiency of employees will increase as unnecessary paper work takes time in handling and printing. When data is stored on disks there is a risk that employees store large or irrelevant files in the disk which will create storage issues.

Definition of my computer​

Answers

Answer:

a programmable electronic device designed to accept data

Explanation:

a programmable electronic device designed to accept data

A programmable divce

Using simplified language and numbers, using large font type with more spacing between questions, and having students record answers directly on their tests are all examples of _____. Group of answer choices universal design analytic scoring cheating deterrents guidelines to assemble tests

Answers

Answer:

universal design

Explanation:

Using simplified language and numbers, using large font type with more spacing between questions, and having students record answers directly on their tests are all examples of universal design.

Universal Design can be regarded as design that allows the a system, set up , program or lab and others to be

accessible by many users, this design allows broad range of abilities, reading levels as well as learning styles and ages and others to have access to particular set up or program.

it gives encouragment to the development of ICTS which can be

usable as well as accessible to the widest range of people.

What Causes #### error?​

Answers

Answer:

The answer is below

Explanation:

Causes of ####error in Microsoft Excel can be traced to multiple sources. The major causes of #### error in Microsoft Excel, however, are the following:

1. When the column is not wide enough to show all values or figures of the cell contents.

2. When there are too many decimal places of the figure in a cell

3. When the date value in the cell is negative

4. When the time value in the cell is negative.

cloud offers better protection compare to on premise?​

Answers

Why is cloud better than on-premise? Dubbed better than on-premise due to its flexibility, reliability and security, cloud removes the hassle of maintaining and updating systems, allowing you to invest your time, money and resources into fulfilling your core business strategies.

The security of the cloud vs. on-premises is a key consideration in this debate. Cloud security controls have historically been considered less robust than onprem ones, but cloud computing is no longer a new technology. . A company running its own on-premises servers retains more complete control over security.

Believe it!!

Pls follow me.

Is" Python programming Language" really
worth studying? If yes? Give at least 10 reasons.

Answers

1. Python is a particularly lucrative programming language

2. Python is used in machine learning & artificial intelligence, fields at the cutting-edge of tech

3. Python is simply structured and easy to learn

4. Python has a really cool best friend: data science dilemma.

5. Python is versatile in terms of platform and purpose

6. Python is growing in job market demand

7. Python dives into deep learning

8. Python creates amazing graphics

9. Python supports testing in tech and has a pretty sweet library

10. There are countless free resources available to Python newbies

Imagine that you wanted to write a program that asks the user to enter in 5 grade values. The user may or may not enter valid grades, and you want to ensure that you obtain 5 valid values from the user. Which nested loop structure would you use?
A. A "for" loop inside of a "while" loop
B. A "while" loop inside of a "for" loop
C. None of the above
D. Either a or b would work

Answers

The type of nested loop which I would use to write the program is:

B. A "while" loop inside of a "for" loop

What is a Loop?

This refers to the control flow statement which is used to iterate and lets a particular line(s) of code execute repeatedly

With this in mind, we can see that the type of nested loop which I would use to write the program is a "while" loop inside of a "for" loop because it is a conditional statement that continues to ask for the certain valid grades until it gets the right one.

Therefore, the correct answer is option B

Read more about loops here:
https://brainly.com/question/26098908

What hardware architectures are not supported by Red Hat?

Answers

It should be Macintosh I hope this help let me know if you have any questions
Other Questions
Wolves have genes that give them a very powerful. How many moles of AgNO3 must react to form 0. 854 mol Ag? mol AgNO3. Casey borrowed $4500 at a 5% interest rate for 4 years.What was the total interest?Enter your answer in the box.Hint: Use the formula I=P*R*T whereI= Interest Earned/OwedP= PrincipalR= RateT= Time PLEASE HURRYYYY! There are 42 students separated into 6 groups for a field trip. How many students are in each group guys pls help with all the steps How could you describe the size of an atom?A It is so large it is bigger than a tree in the forest.B It is so small it cannot be seen without magnification.C It is the size of a grain of sand and can be seen with our eyes.D It is the size of an apple or a large piece of fruit. How has an abundance of mineral resources impacted Saudi Arabias economic growth? HELP The pair of points (5, 6) and (10, y) lie on a line with slope 4/5 . What is the value of y? solve the systems of equations using substitution y = -3x + 5 5x - 4y = -3 h(x)=3x3, find h(3)h(3) Verbalize about the function of ovulation The Davis family grows organic vegetables to sell at a local farmers market. Which are factors that directly affect their profit? Check all that apply. Which process occurs at location W? precipitation evaporation condensation transpiration. The football team has a total of 350 jerseys. There are 154 medium-sized jerseys. What percent of the jerseys are medium-sized jerseys?Pls help me how to find intersection from -8x+3y=11 and y=3x+4 1Find the indicated values for f(x) = -X.-a.b.f(0)f(22)f(-22)C.a.f(0) == Please help! photo is attached with the problem. please answer my question i really need it Divide (x^3+2x-6x-9) by (x+3) Which of the following statements is true regarding this data set: 41, 13, 17, 10, 5, 19?.