Home Segments Index Top Previous Next

153: Practice

The stock value of a company is the product of the price per share and the number of shares outstanding. Write a program that accepts the prices per share and numbers of shares outstanding for two companies. Your program is to display 1 if the stock value of the first company is greater than that of the second; otherwise, your program is to display 0.