自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

火竹的专栏

学无先后,达者为师!

  • 博客(6)
  • 资源 (1)
  • 收藏
  • 关注

原创 ch4_drill

//Write a program that consists of a while-loop that (each time around// the loop) reads in two ints and then prints them. Exit the program when//a terminating '|' is entered.#include "std_lib_facilities.h"int main(){ int val1, val2; whil

2011-01-16 21:36:00 777 1

原创 4.5.1 Why bother with functions?

TRY THIS Implement square() without using the multiplication operator; that is, do the x*x by repeated addition(start a variable result at 0 and add x to it x times). Then run some version of "the first program" using that square(). #include "std_lib_facil

2011-01-05 22:53:00 289

原创 4.4.2.3 for-statements

<br />TRY THIS <br />Rewrite the character value example from the previous Try this to use a for-loop. Then modify your program to alse write out a table of the integer values for uppercase letters and digits.<br />#include "std_lib_facilities.h"int ma

2011-01-05 22:50:00 241

原创 4.4.2.1 while-statements

TRY THIS The character 'b' is char('a'+1), 'c' is char('a'+2), etc. Use a loop to write out a table of characters with their corresponding integer values:     a            97     b            98     ....     z            122//Version 1#include "std_lib_f

2011-01-05 22:44:00 262

原创 4.4.1.3 Switch technicalities

<br />TRY THIS <br />Rewrite your currency converter program from the previous Try this to use a switch-statement. Add conversions from yuan and kroner. Which version of the program is easier to write, understand, and modify? Why?<br />#include "std_lib_fa

2011-01-05 22:38:00 287

原创 4.4.1.1 if-statements

TRY THIS Use the example above as a model for a program that converts yen, euros, and pounds into dollars. If you like realism, you can find conversion rates on the web.#include "std_lib_facilities.h"int main(){ const double dol_per_yen = 0.0123;

2011-01-05 22:10:00 323

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除