笔记
坚持写博客的正
分享自己的学习笔记
展开
-
练习
1010: 求圆的周长和面积#include<stdio.h>#define PI 3.14159int main(void){ double r , C , S; scanf("%lf" , &r); C=2*PI*r; S=PI*r*r; printf("%.2lf %.2lf\n" , C , S); return 0;}原创 2021-08-31 23:06:22 · 58 阅读 · 0 评论 -
练习
1009: 求平均分#include<stdio.h>int main(void){ int x , y , z; double average; scanf("%d %d %d" , &x , &y , &z); average=(x+y+z)/3; printf("%.2lf" , average); return 0;}原创 2021-08-30 22:40:26 · 55 阅读 · 0 评论 -
练习
1008: 美元和人民币#include<stdio.h>int main(void){ int x; float y; scanf("%d" , &x); y=x*6.5573; printf("%.2f" , y); return 0;}原创 2021-08-30 19:47:57 · 46 阅读 · 0 评论 -
练习
1007: 鸡兔同笼#include<stdio.h>int main(void){ int m , n; scanf("%d %d" , &m , &n); printf("%d %d" , (4m-n)/3 , (n-m)/3); return 0;}原创 2021-08-28 17:33:42 · 55 阅读 · 0 评论 -
练习
1006: 等差数列求和#include<stdio.h>int main(void){ int a1 , an , d; scanf("%d %d %d" , &a1 , &an , &d); printf("%d\n" , [(an-a1)/d+1]*(a1+an)/2); return 0;}原创 2021-08-27 17:31:58 · 60 阅读 · 0 评论 -
练习
1005: 整数幂#include<stdio.h>int main(void){ int a , b , c; scanf("%d %d %d", &a , &b , &c); printf("%9d%9d%9d\n", a , a^10 , a^100); printf("%9d%9d%9d\n", b , b^10 , b^100); printf("%9d%9d%9d\n", c , c^10 , c^100原创 2021-08-26 17:30:36 · 64 阅读 · 0 评论 -
练习
1004: 三位数的数位分离#include<stdio.h>int main(void){ int a; scanf("%d" , &a); printf("%d %d %d\n" , a%10 , a/10%10 , a/100); return 0;}原创 2021-08-25 17:19:27 · 59 阅读 · 0 评论 -
练习
1004:原创 2021-08-24 17:20:17 · 51 阅读 · 0 评论 -
练习
1002: 简单多项式求值#include<stdio.h>int main(void){ int x; scanf("%d" , &x); printf("%d" , 2*x*x+x+8); return 0;}原创 2021-08-23 13:04:21 · 60 阅读 · 0 评论 -
C语言知识点
C语言输入输出输出#include <stdio.h>int main(void){ char x=‘a’; int i=98; printf("%c,%d\n",x,x); printf("%c,%d\n",i,i); // output //a,97 //b,98}输入scanf函数的格式字符串的组成格式符和printf函数类似,scanf函数的格式字符串原创 2021-08-22 20:53:25 · 56 阅读 · 0 评论 -
练习
1001: 植树问题#include<stdio.h>int main(void){ int m,n; scanf("%d%d" , &m , &n); printf("%d %d" , m/n , m%n); return 0;}原创 2021-08-22 20:27:39 · 60 阅读 · 0 评论 -
练习
1000: 整数a+b#include<stdio.h>int main(void){ int a,b; scanf("%d%d" , &a , &b); printf(%d , a+b); return 0;}在这里插入代码片原创 2021-08-22 16:51:42 · 103 阅读 · 0 评论