![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c语言
周鑫文
这个作者很懒,什么都没留下…
展开
-
C语言 用if goto求n!
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { printf("这是一个求n!的程序,请输入n:"); int n; scan原创 2017-10-17 16:33:03 · 704 阅读 · 0 评论 -
强制类型转换
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { float shixing;原创 2017-10-14 16:03:01 · 211 阅读 · 0 评论 -
改变字符型各值
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { char c1,c2,c3,c4,c5;原创 2017-10-14 16:51:40 · 243 阅读 · 0 评论 -
输出单个字符
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { char zifu1,zifu2,zifu3;原创 2017-10-14 16:58:45 · 815 阅读 · 0 评论 -
C语言 输入单个字符
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { char zifu;原创 2017-10-14 17:08:33 · 23745 阅读 · 0 评论 -
字符数据的输出
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { char fuhao='a'; int shuzi=97; printf("原创 2017-10-15 11:45:56 · 287 阅读 · 0 评论 -
C语言 字符串的输出
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { printf("%3s,%7.4s,%7.2s,%5.4s","xiaopihai原创 2017-10-15 11:56:10 · 327 阅读 · 0 评论 -
实型数据的有效位
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { float shixing=8888.88,shixing1=1111.11;原创 2017-10-15 12:22:27 · 645 阅读 · 0 评论 -
双精度有效位
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { double shuangjingdu1,shuangjingdu2,he;原创 2017-10-15 13:03:30 · 484 阅读 · 0 评论 -
输出制定小数位
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { double shilishu=12345.67890;原创 2017-10-15 13:12:56 · 223 阅读 · 0 评论 -
scanf输入
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int zhengshu1,zhengshu2,zhengshu3;原创 2017-10-15 13:20:08 · 355 阅读 · 0 评论 -
输入三角形的三边长输出面积
#include #include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop *///公式area=sqrt(s*(s-bian1)*(s-bian2)*(s-bian3)),s=(bian1+bian2+bian3)原创 2017-10-15 13:49:26 · 3620 阅读 · 0 评论 -
C语言输入小写输出大写
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { char zifu;原创 2017-10-15 14:07:34 · 8956 阅读 · 1 评论 -
C语言比较两数大小
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int shu1,shu2; printf("请输入比较大小的两个数:");原创 2017-10-15 20:33:20 · 7068 阅读 · 0 评论 -
用c语言求解一元二次方程
#include #include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int a,b,c;原创 2017-10-15 20:14:08 · 19288 阅读 · 7 评论 -
C语言大小写转换
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { char zifu; //声明字符型变量zifu原创 2017-10-15 21:52:18 · 3016 阅读 · 0 评论 -
C语言判断输入数正负
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int shu1,shu2; printf("请输入需要判断的数:"); sc原创 2017-10-15 21:25:02 · 20219 阅读 · 2 评论 -
C语言三数比大小
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int shu1,shu2,shu3; printf("请输入比大小的三个数:"原创 2017-10-15 20:44:17 · 1781 阅读 · 0 评论 -
c语言字符型赋予整型
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { char zifu1,zifu2;原创 2017-10-14 15:43:26 · 3105 阅读 · 0 评论 -
转义字符的使用
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { printf(" 撇n的作用是\n试验1\n");原创 2017-10-14 15:37:32 · 1093 阅读 · 0 评论 -
C语言整型溢出
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { short bianliang1,bianliang2;原创 2017-10-14 15:17:47 · 395 阅读 · 0 评论 -
C语言用while求n!
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int n,dangqianshu=1,jiecheng=1; printf("原创 2017-10-17 16:39:45 · 10030 阅读 · 0 评论 -
C语言do while实现n!
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int n,dangqianshu=1,jiechengshu=1; print原创 2017-10-17 16:45:43 · 4639 阅读 · 0 评论 -
C语言把1——100内不能被3整除的数输出
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int shu=1,dijishu=0; printf("这是1——100,不能原创 2017-10-17 16:53:54 · 16657 阅读 · 3 评论 -
c语言输出pai的近似值
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop *///pai的近似值=1-1/3+1/5-1/7+……; int main(int argc, char** argv) { double n,fenzi=原创 2017-10-17 22:20:23 · 4929 阅读 · 0 评论 -
fibonacci数列计算
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int shu1=1,shu2=1,i,n; printf("请输入数列位数的一原创 2017-10-17 22:43:13 · 368 阅读 · 0 评论 -
c语言求素数
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int a,n,i,sushu=1; printf("请输入起始与结束的数:")原创 2017-10-18 20:09:52 · 1317 阅读 · 0 评论 -
C语言 字母加4密码
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { char zifu; printf("请输入源密码:"); while((原创 2017-10-19 13:15:19 · 2979 阅读 · 0 评论 -
C语言输入一行信息
#include //输入输出头文件void main() //主函数{ printf("这是一个c程序\n"); //输出语句 system("pause"); //暂停dos窗口,显示结果}原创 2017-10-11 22:59:52 · 1751 阅读 · 0 评论 -
C语言计算两数和
#include //输入输出头文件void main() //主函数{ int weizhishu1 = 123, weizhishu2 = 456, he; //定义各变量且初始化 he = weizhishu1原创 2017-10-11 23:23:41 · 2003 阅读 · 0 评论 -
C语言求2个数中较大数
#include //输入输出头文件void main() //主函数{ int max(int shu1, int shu2); //声明max函数 int shu1, shu2, jiaod原创 2017-10-12 00:19:21 · 4583 阅读 · 0 评论 -
c语言 比较三数大小
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int weizhishu1, weizhishu2, weizhishu3,zu原创 2017-10-12 23:06:01 · 1281 阅读 · 0 评论 -
C语言 乘法计算
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int weizhishu1,weizhishu2,weizhishu3,weiz原创 2017-10-12 23:19:08 · 8017 阅读 · 0 评论 -
c语言 计算闰年
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int year,panduan; printf("请输出需要判断的年份:");原创 2017-10-12 23:30:11 · 7362 阅读 · 0 评论 -
c语言 分数阶乘计算
计算n为1~100的[(-1)^(n+1)*(1/n)]!原创 2017-10-13 11:54:20 · 4155 阅读 · 0 评论 -
计算n的阶乘
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop *//*计算n!*/ int main(int argc, char *argv[]) { printf("这是一个输出n!的程序;\n"); print原创 2017-10-13 20:26:10 · 756 阅读 · 0 评论 -
符号变量的使用
#include #include #define HONG 30 /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int changliang,ji; cha原创 2017-10-14 11:52:20 · 934 阅读 · 0 评论 -
整型定义的使用
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int bianliang1,bianliang2,he1,he2;原创 2017-10-14 15:00:21 · 362 阅读 · 0 评论 -
C语言输入成绩等级输出对应分数段
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int chengji; printf("请输入成绩:"); scanf("%原创 2017-10-17 16:22:04 · 31842 阅读 · 0 评论