Showing posts with label units. Show all posts
Showing posts with label units. Show all posts

Sunday, 28 March 2021

A cannister contains exactly 125 cups of coffee.

 Question: A cannister contains exactly 125 cups of coffee. How many ounces are in the cannister? (1 cup = 8 ounces)

Solution:
Given, 1 cup = 8 ounces

Therefore,

125 cups of coffee = (8 ounces × 125 cups)/1cup

= 1000 ounces

So the cannister contains 1000 ounces of coffee.

One cup holds 8 ounces. If a cup is 2/5 full, how many ounces are in the cup?

 Question: One cup holds 8 ounces. If a cup is 2/5 full, how many ounces are in the cup? 

Solution: One cup can hold 8 ounces.
A cup is 2/5 full
The number of ounces in the cup = 8x2/5
= 16/5
=3.2 ounces
3.2 ounces are there in the 2/5 full cup.

Wednesday, 15 April 2020

C++ Question - Farenheit to Celcius

Q: Write a program which accept temperature in Fahrenheit and print it in centigrade.
Solution:

#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
 float F,C;
 cout<< "\nEnter temperature in Farenheit : ";
 cin>>F;
 C=5*(F-32)/9;
 cout<<"Temperature in celcius is : "<<C;
 return 0;
}

Screenshot: