jawavv
pseudocode:
- initialize variables = numOfShops, profitList, sharedProfitList, highestSharedProfit, lowestSharedProfit
- input numOfShops
- for i in range 0 to numOfShops-1:
3.1 input profit of shop i
3.2 append profit to profitList
- for each profit in profitList:
4.1 calculate shared profit (profit x 0.5)
4.2 append shared profit to sharedProfitList
- set highestSharedProfit to the maximum value in sharedProfitList
- set lowestSharedProfit to the minimum value in sharedProfitList
- display highestSharedProfit and lowestSharedProfit
"Le meilleur moyen de prévoir l'avenir, c'est de l'inventer"
- Alan Kay
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
jawavv
pseudocode:
- initialize variables = numOfShops, profitList, sharedProfitList, highestSharedProfit, lowestSharedProfit
- input numOfShops
- for i in range 0 to numOfShops-1:
3.1 input profit of shop i
3.2 append profit to profitList
- for each profit in profitList:
4.1 calculate shared profit (profit x 0.5)
4.2 append shared profit to sharedProfitList
- set highestSharedProfit to the maximum value in sharedProfitList
- set lowestSharedProfit to the minimum value in sharedProfitList
- display highestSharedProfit and lowestSharedProfit
"Le meilleur moyen de prévoir l'avenir, c'est de l'inventer"
- Alan Kay