91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 67KB
    文件類型: .7z
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-01-08
  • 語言: 其他
  • 標簽: C??源碼??

資源簡介

隨書源碼 PART ONE Preliminaries 1 1 An Overview of ANSI C 1.1 What is C? 1.2 The structure of a C program 1.3 Variables,values ,and types 1.4 Expressions 1.5 Statements 1.6 Functions 2 Data Types in C 2.1 Enumeration types 2.2 Data and memory 2.3 Pointers 2.4 Arrays 2.5 Pointers and arrays 2.6 Records

資源截圖

代碼片段和文件信息

/*
?*?File:?addlist.c
?*?---------------
?*?This?program?adds?a?list?of?numbers.??The?end?of?the
?*?input?is?indicated?by?entering?a?sentinel?value?which
?*?is?defined?by?setting?the?value?of?the?constant?Sentinel.
?*/

#include?
#include?“genlib.h“
#include?“simpio.h“

/*
?*?Constants
?*?---------
?*?Sentinel?--?Value?that?terminates?the?input?list
?*/

#define?Sentinel?0

/*?Main?program?*/

main()
{
????int?value?total;

????printf(“This?program?adds?a?list?of?numbers.\n“);
????printf(“Use?%d?to?signal?the?end?of?list.\n“?Sentinel);
????total?=?0;
????while?(TRUE)?{
????????printf(“???“);
????????value?=?GetInteger();
????????if?(value?==?Sentinel)?break;
????????total?+=?value;
????}
????printf(“The?total?is?%d\n“?total);
}

評論

共有 條評論