正在加载图片...
OoP/ Slide 6 Temperature example Write a program that, given a temperature in Fahrenheit or Celsius, will display the equivalent temperature in each of the scales double degree=0.0; / needs 2 items char scale F To apply a function f() to a temperature, we must specify both degree and scale f(degree, scale)i Also to display a temperature 197 8202(Putonghua) cout < degree < scale 1878066( English)OOP / Slide 6 Temperature example Write a program that, given a temperature in Fahrenheit or Celsius, will display the equivalent temperature in each of the scales. double degree = 0.0; // needs 2 items! char scale = 'F'; To apply a function f() to a temperature, we must specify both degree and scale: f(degree, scale); Also to display a temperature: cout << degree << scale;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有