-
-
6
-
6代码如下: int a[3]= {1,2,3}; int *p=a; printf("a=%d\n",a); printf("&a[0]=%d\n",&a[0]); printf("a+1=%d\n",a+1); printf("&p=%d\n",&p); printf("&p+1=%d\n",&p+1); 结果如下: a=6422036 &a[0]=6422036 a+1=6422040 &p=6422024 &p+1=6422032 结果中最后两行的结果不理解
-
38
-
1
-
2
-
15RT
-
0C语言必学知识:数组详解+项目实战!计算机专业补课必看,课堂上没讲到的全在这里,边学边练,不怕不会用!C语言必学知识:数组详解+项目实战!计算机专业补课必看,课堂上没讲到的全在这里,边学边练,不怕不会用!_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili转自:https://www.bilibili.com/video/BV1y64y1S7gV?share_source=tieba_w
-
5
-
12
-
4
-
0【C语言从入门到精通】第五节丨C语言的先行知识!_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili转自:https://www.bilibili.com/video/BV1Yb4y1D7UB?share_source=tieba_w
-
1我写的 #include <stdio.h> int f(int i) { int x; x=i*i*i-5*i*i+16*i-80; return x; } int main() { int x1,x2; int x; int y,y1,y2; do { scanf("%d,%d",&x1,&x2); } while(f(x1)*f(x2)>0); y=f(x); y1=f(x1); y2=f(x2); do { x=(x1*f(x2)-x2*f(x1))/(f(x2)-f(x1)); if(y*y1>0) {x1=x; y1=y; } else {x2=x; y2=y; } } while(f(x)>1e-5||f(x)<-(1e-5)); printf("%d",x); return 0; }
-
5
-
5
-
3代写代码 🐧1542134216
-
5代写代码。
-
0该课程总结了将c语言代码写的更整洁,更可靠的方法。 从编程小白,到写出一线大厂的代码质量,必然会碰到的知识点。 相信会给你带来收获,欢迎试听。 https://edu.csdn.net/course/detail/32428 你将收获 提高代码可读性 代码变得更加稳定 代码质量快速提升 开发调试水平提升 适用人群 该课程最适合已经学习过C/C++语法,但是还缺乏实际编程经验。不知道如何写出高质量代码的入门程序员。 提升代码编程水平,为迈向一线大厂添砖铺路。
-
4不用动脑的方法 是遍历 一下: #include <stdio.h> int max4(int a, int b, int c, int d){ int i,j; int x[4],tmp; x[0]=a;x[1]=b;x[2]=c;x[3]=d; for (i=0;i<3;i++) for (j=i+1;j<4;j++) if (x[j]>x[i]){tmp=x[i];x[i]=x[j];x[j]=tmp;} return x[0]; } int main(){ int a[]={4,8,7,15}; int b[]={7,9,17,14}; int c[]={6,9,12,8}; int d[]={6,7,14,6}; int i,j,k,m; int R,r; int i0=0,j0=1,k0=2,m0=3; R = max4(a[i0],b[j0],c[k0],d[m0]); for (i=0;i<4;i++){ for (j=0;j<4;j++){ for (k=0;k<4;k++){ for (m=0;m<4;m++){ if (i!=j && i!=k && i!=m && j!=k && j!=m
-
6
-
13
-
2
-
2
-
0c/c++初级编程实践:全网最简单的太空人表盘开发教程来了!动画制作,文本样式,不规则窗口等等,超简单~_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili转自:https://www.bilibili.com/video/BV1sA411L7bZ?share_source=tieba_w
-
43
-
6我想问一下,有什么好用的语言编译器,急急急!谢谢啦
-
3
-
3#include <stdio.h> #include <string.h> void CalcJunior(int *year,float *salary,char *J); void CalSenior(int *year,float *salary,char *J); void PrintInfo(int year,char J,float salary); int main() { int year,position; float salary; char ID[100],J; printf("Enter staff ID:"); scanf("%s",&ID); printf("Enter years of working:"); scanf("%d",&year); printf("Enter your position [1: Junior, 2: Senior]:"); scanf("%d",&position); if(position==1) { CalcJunior(&year,&salary,&J); } else { CalSenior(&year,&
-
7
-
5
-
3
-
14
-
6
-
27
-
4#include <stdio.h> void Enter(char[],int,float); void Calc(float); void Print(char[],int,float); void main() { int age; char name[100]; float fee; Enter(name,age,fee); Calc(fee); Print(name, age, fee); } void Enter(char name[100],int age,float fee) { printf("Enter name:"); gets(name); printf("Enter age:"); scanf("%d",&age); getchar(); printf("Enter fee:"); scanf("%f",&fee); getchar(); } void Calc(float fee) { fee=50+fee; } void Print(char name[100],int age,float fee) { printf("\nName:%s\nAge:%d\nFee:%.2f",name,age,fee);
-
8
-
14typedef struct Book { int number; int year; int times; char ISBN[20]; char name[20]; char editor[20]; float price; char publisher[20]; int lend; int have; int nowBook; struct Book *next; }Book,*linklist; void input(linklist *L,int n) { int number; int year; int times; char ISBN[20]={0}; char name[20]={0}; char editor[20]={0}; float price; char publisher[20]={0}; int lend; int have; int nowBook; int i; linklist p; p=*L; printf("请按以下格式输入图书信息:主编,出版社,出版年,版次,IBSN书号,书名,定价,拥有本数,借出本数,现余本数\n"); for(i=0;i<n;i++)
-
3
-
1在百度知道里找到的网址下不下来,不知道有谁可以提供一下帮助
-
10
-
1程序语言,C C++,java都可以,有需要评论区看V