首页 > 系统相关 >ubuntu的下载与测试

ubuntu的下载与测试

时间:2022-10-18 19:44:46浏览次数:41  
标签:return int float x2x 测试 printf include ubuntu 下载

3

1.用vim新建并打开一个名为hello.c的c语言文件
2.在文件输入

#include <stdio.h>
int main()
{
printf("hello world!");
return 0;
}

3.运行

4.1

文件main1.c

代码块


#include<stdio.h>
float x2x(int a,int b);
int main()
{
    int a,b;
    printf("Please input a=");
    scanf("%d",&a);
    printf("Please input b=");
    scanf("%d",&b);
    printf("The value is:%.2f\n",x2x(a,b));
    return 0;
}

文件sub1.c

#include<stdio.h>
float x2x(int a,int b)
{
    float c;
    c=a+b;
    return c;
}

4.2

在Vc++6.0运行结果

5.1

如图

标签:return,int,float,x2x,测试,printf,include,ubuntu,下载
From: https://www.cnblogs.com/blyat/p/16676659.html

相关文章