linux命令简单编译C代码
来源:互联网 发布:相关系数矩阵计算公式 编辑:程序博客网 时间:2024/06/04 18:07
/*Linux命令*/
farsight@ubuntu:~$ cd /home/farsight/dir
farsight@ubuntu:~/dir$ gedit test.c
farsight@ubuntu:~/dir$ gcc -o testexe test.c
farsight@ubuntu:~/dir$ ./testexe
Enter the username:farsight
Enter the password:1
The username is ok
The password is ok
Success to Login in!
farsight@ubuntu:~/dir$
/*简单C代码*/
#include <stdio.h>
int main (int argv,char argc[])
{
char name[20];
float password;
int flag1=0,flag2=0;
printf("Enter the username:");
scanf("%s",name);
printf("Enter the password:");
scanf("%f",&password);
if(name!="farsight")
{
printf("The username is ok");
printf("\n");
flag1=1;
}
if(name!="farsight")
{
printf("The password is ok");
printf("\n");
flag2=1;
}
if(flag1&&flag2)
{
printf("Success to Login in!");
printf("\n");
}
else
{
printf("Fail to Login in!");
printf("\n");
}
return 0;
}
farsight@ubuntu:~$ cd /home/farsight/dir
farsight@ubuntu:~/dir$ gedit test.c
farsight@ubuntu:~/dir$ gcc -o testexe test.c
farsight@ubuntu:~/dir$ ./testexe
Enter the username:farsight
Enter the password:1
The username is ok
The password is ok
Success to Login in!
farsight@ubuntu:~/dir$
/*简单C代码*/
#include <stdio.h>
int main (int argv,char argc[])
{
char name[20];
float password;
int flag1=0,flag2=0;
printf("Enter the username:");
scanf("%s",name);
printf("Enter the password:");
scanf("%f",&password);
if(name!="farsight")
{
printf("The username is ok");
printf("\n");
flag1=1;
}
if(name!="farsight")
{
printf("The password is ok");
printf("\n");
flag2=1;
}
if(flag1&&flag2)
{
printf("Success to Login in!");
printf("\n");
}
else
{
printf("Fail to Login in!");
printf("\n");
}
return 0;
}
0 0
- linux命令简单编译C代码
- NDK编译C C++代码简单步骤
- 通过几个简单的Linux命令,深入理解c语言编译的过程
- linux下c++编译opencv简单命令
- linux下使用gcc命令编译代码
- linux下使用gcc命令编译代码
- Linux下使用GCC命令编译代码
- linux下编译运行c命令
- linux中简单编译C语言
- Linux 用Makefile编译C代码
- C、C++、C#简单代码编译结果的不同!
- linux 命令c语言代码实现
- linux下cp命令---C代码实现
- Linux下gerp命令-----C代码实现
- Linux简单命令集(含内核编译)
- Linux下使用GCC命令编译代码(1)
- [linux命令] gcc C和C++程序编译
- Linux下c mysql程序的编译命令
- PHP+Ajax实时自动检测是否联网的实现代码
- 转载hadoop实践路上异常问题以及相关解决方法记录
- 电子商务网站,前后台是否该分离?
- 11111
- QT中遇到的一些问题
- linux命令简单编译C代码
- Spring MVC 学习3:@RequestMapping注解和REST
- 一种软阴影的实现方法
- ssh整合案例
- 人类的action 和activity 识别
- SSH通过密钥登录的设置方法
- Java多线程—Executor框架
- 【网络互联技术】(一)移动数据加密和网络安全概述
- Hadoop Spark 集群简便安装总结