字符串的格式化输入与输出
来源:互联网 发布:淘宝怎么能提高流量 编辑:程序博客网 时间:2024/04/29 11:06
/*talkback.c -- 一个能为你提供一些信息对话的程序 */
#include <stdio.h>
#include <string.h> //提供strlen ()函数原型
#define DENSITY 62.4 //人的密度(单位是:英镑/每立方英尺)
int main (void)
{
float weight, volume;
int size, letters;
char name [40];
printf ("Hi,What's your first name?\n");
scanf ("%s",name);
printf ("%s ,What's your weight in pounds\n",name);
scanf ("%f",&weight);
size = sizeof name;
letters = strlen (name);
volume = weight / DENSITY;
printf (" well ,%s, your volume is %2.2f cubic feet.\n",name,volume);
printf (" Also, your first name has %d letters,\n",letters);
printf (" and we have %d bytes to store it in.\n,size ");
return 0;
}
- 字符串的格式化输入与输出
- 格式化输入与输出
- 格式化输入与输出
- 格式化输入与输出
- 格式化输入与输出
- 字符串和格式化输入/输出
- 字符串和格式化输入/输出
- 字符串和格式化输入/输出
- 字符串和格式化输入/输出
- 字符串的输入与输出
- 字符串的输入与输出
- 字符串的输入与输出
- 黑马程序员——字符串与格式化输入/输出
- Java字符串的格式化与输出
- 第四章 字符串和格式化输入/输出
- C -- 字符串和格式化输入/输出
- 第四章 字符串和格式化输入\输出
- Java字符串、输入和格式化输出
- 小车问题
- 版本管理器的发展史
- MFC学习第二节:在窗口中输出0-100的十行十列数字
- 细胞编程:控制你的身体
- 数据仓库维度模型粒度提升情况浅析
- 字符串的格式化输入与输出
- chromium Callback 部分翻译
- zoj1489 hdu 1395 (数论)
- javascript中的单例模式
- 提升火狐的上网速度
- IOS之通讯录ABAddressBook
- c++排序和去除重复的算法
- 使用sencha cmd 进行开发,测试和生产prod.
- Google Buffer代码生成工具