Lab 1 SSK Programming Report
Lab 1 SSK Programming Report
1. Write a solution for a Java program to read a number in feet as input, convert it to
meters, and displays the result to the users. (Formula: 1 foot = 0.305 meters.)
start
print meters
end
Pseudocode
Begin
Enter length
Meters = feet x 0.305
Display length in meters
End
2. An instructor calculates the percentages for grading his students based on the achieved
marks in exam. Based on the given maximum marks and a student’s marks by the user,
write a solution for a Java program to calculate and print the required percentage. (Hint:
Percentage = marks / maximum_marks * 100)
Develop flowchart
start
print percentage
end
Pseudocode
Begin
Enter mark achieved
Enter maximum mark
Percentage = (mark / maximum mark) x 100
Display percentage mark
End
3. An electronics company produces circuit boards with the production cost, PC, for each
board. The profits that should be earned for each board is 40 percent from PC, so the
company needs to calculate the selling price, SP. Then they want to project simulation
for producing and selling N number of circuit boards, and calculate the profits that could
be earned. Write the solution of a Java program to help the company produce the
simulation/projection. Determine the suitable input and output values for your solution.
Develop flowchart
start
Pseudocode
Begin
Enter production cost
Enter number of circuit boards
Selling price = 1.4 x production cost
Profits = 0.4 x production cost x number of circuit boards
Display selling price
Display profits
End