?? addlist.c
字號:
/* * File: addlist.c * --------------- * This program adds a list of numbers. The end of the input * is indicated by entering a blank line as a sentinel value. */#include <stdio.h>#include "genlib.h"#include "simpio.h"#include "strlib.h"main(){ int total; string line; printf("This program adds a list of numbers.\n"); printf("Signal end of list with a blank line.\n"); total = 0; while (TRUE) { printf(" ? "); line = GetLine(); if (StringEqual(line, "")) break; total += StringToInteger(line); } printf("The total is %d\n", total);}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -