Professional Documents
Culture Documents
pasha 2
pasha 2
Semester: 2ND
Registration # FA23-BCS-150
Submitted to : MAM IQRA
Purpose:
Consistency:
Library functions are consistent follow a behavior across different platform ensure
probability and ease of use
Efficiency:
Library function are often optimized for performance and reliability benefiting
from years of refinement and testing
Examples:
In c language “ printf ” ,” scanf “
In c++ language “ cout ” ,” cin ”
In python “ print ”, “ len()’’
code
Outputs are below of every case:
Q:4 Write a program that produces the following output using Coot
statement.
++
++
+++++++++++++++
+++++++++++++++
++
++
code
Output is below
Q:5 A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm
ships carton of milk
To a local grocery store. The cost of producing one liter of milk is $0.38, and
the profit of each
Carton of milk is $0.27. Write a program that does the following:
Prompts the user to enter the total amount of milk produced in the morning
Outputs the number of milk cartons needed to hold milk.
Code is below: