add2f.c
来自「The art and science of c_source code!」· C语言 代码 · 共 24 行
C
24 行
/* * File: add2f.c * ------------- * This program reads in two floating-point numbers, adds them * together, and prints their sum. */#include <stdio.h>#include "genlib.h"#include "simpio.h"main(){ double n1, n2, total; printf("This program adds two floating-point numbers.\n"); printf("1st number? "); n1 = GetReal(); printf("2nd number? "); n2 = GetReal(); total = n1 + n2; printf("The total is %g\n", total);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?