c语言输出个人姓名学号
@殳淑3976:用c语言输出显示自己的姓名和学号,请写出完整的程序代码 -
养别17278036841…… #include <stdio.h>#include <stdlib.h>int main(void){FILE *fp=fopen("data.txt","r");if (!fp){fp=fopen("data.txt","w");printf("请输入姓名:");char *name;scanf("%s",name);printf("请输入学号:");char *num;scanf("%s",num...
@殳淑3976:如何用c语言输出自己的名字和学号,膜拜各位大大解救.
养别17278036841…… printf("学号:%s, 名字%s", num,name)
@殳淑3976:用C语言输出学生信息,输出学生本人的学号、姓名、年龄、班级等信息(定义变量后输出) -
养别17278036841…… #include "stdio.h" struct student { char num[6]; char name[8]; int clas[3]; int old[3]; } stu[5]; void main() {int i; for(i=0;i<5;i++) { printf("\n please input No. %d score:\n",i); printf("stuNo:"); scanf("%s",stu[i].num); printf("name:"); ...
@殳淑3976:求一个C语言程序,录入学生的名字和学号. -
养别17278036841…… 也不知道你想要的是个什么样的程序,随便写一个简单的,你看看吧. #include <stdio.h> #include <stdlib.h> int main(void) { char s[10];//姓名 int num;//学号 printf("请输入姓名:\n"); gets(s); printf("请输学号:\n"); scanf("%d",&num); printf("姓名是:%s\n学号是:%d\n",s,num); system("pause"); return 0; }
@殳淑3976:编写程序在输出屏幕上分三行显示学院学号姓名? -
养别17278036841…… C语言编写程序,在屏幕上分三行输入自己的学院专业、学号和姓名 #include void main(){ printf("班级:2015级计算机应用1班\n"); printf("学号:123456789 \t姓名:张三"); } 很简单,就两个输出语句,\n意思就是换行,\t是空8个字符的位置
@殳淑3976:c语言怎么编译输入学号或者名字,输出同一个结果 -
养别17278036841…… 搞个结构体 typedef struct studentInfo { int studentNumber; char name[20]; int ohters1; int other2; } studentInfo Xiaoming = { 123;xiaoming; 222; 333 } 把你要输出的结果搞成other1或者其他的东西放到结构体里; 然后把学生的数据例如名字...
@殳淑3976:c语言编写名字全拼,和学号 -
养别17278036841…… 您好,您这样:#include<stdio.h> int main() { printf("你所需要写的学号,姓名,班级,电子邮箱\n"); return 0; }
@殳淑3976:C语言中,怎么样输入:学号,姓名,联系方式,输出预定的参数呢?知道的解答下,谢谢了~! -
养别17278036841…… /*以后学到结构体就来的简单了*/ #include "stdio.h" #define MAXLEN 15 struct stu { char num[MAXLEN]; char name[MAXLEN]; char tel[MAXLEN]; }; void ReadIn(struct stu *stu) { printf("请输入学号:"); scanf("%s",stu->num); printf("...
@殳淑3976:程序每次运行输出随机的学号和姓名 运用c语言 -
养别17278036841…… 这种类数据多采用学号作为关键字,那么可以采用随机数函数rand();来产生一个随机信号.rand()%M+N; (M为学生数目,N为最小学号数),即可产生一个随机学号,根据学号检索姓名就可以了.rand的调用要初始化,调用之前先执行srand();这两个函数的头文件为#include<stdlib.h>#include<stdio.h>#include<stdlib.h> void main() { int b; srand(34);//34为种子数,可以为任意值 b=rand()%M+N; }
@殳淑3976:c语言 .用结构体输出学生姓名、学号和成绩 我有c++的程序 但是看不懂 只会c语言 -
养别17278036841…… C++ 中的struct与class的区别是:struct的默认访问级别是public,class 的访问级别是private.C++中的struct和class一样可以有成员函数(上面代码中的 void show是成员函数;Student(char *name, char *id, int grade)是一个特殊的成员函数,叫构...
养别17278036841…… #include <stdio.h>#include <stdlib.h>int main(void){FILE *fp=fopen("data.txt","r");if (!fp){fp=fopen("data.txt","w");printf("请输入姓名:");char *name;scanf("%s",name);printf("请输入学号:");char *num;scanf("%s",num...
@殳淑3976:如何用c语言输出自己的名字和学号,膜拜各位大大解救.
养别17278036841…… printf("学号:%s, 名字%s", num,name)
@殳淑3976:用C语言输出学生信息,输出学生本人的学号、姓名、年龄、班级等信息(定义变量后输出) -
养别17278036841…… #include "stdio.h" struct student { char num[6]; char name[8]; int clas[3]; int old[3]; } stu[5]; void main() {int i; for(i=0;i<5;i++) { printf("\n please input No. %d score:\n",i); printf("stuNo:"); scanf("%s",stu[i].num); printf("name:"); ...
@殳淑3976:求一个C语言程序,录入学生的名字和学号. -
养别17278036841…… 也不知道你想要的是个什么样的程序,随便写一个简单的,你看看吧. #include <stdio.h> #include <stdlib.h> int main(void) { char s[10];//姓名 int num;//学号 printf("请输入姓名:\n"); gets(s); printf("请输学号:\n"); scanf("%d",&num); printf("姓名是:%s\n学号是:%d\n",s,num); system("pause"); return 0; }
@殳淑3976:编写程序在输出屏幕上分三行显示学院学号姓名? -
养别17278036841…… C语言编写程序,在屏幕上分三行输入自己的学院专业、学号和姓名 #include void main(){ printf("班级:2015级计算机应用1班\n"); printf("学号:123456789 \t姓名:张三"); } 很简单,就两个输出语句,\n意思就是换行,\t是空8个字符的位置
@殳淑3976:c语言怎么编译输入学号或者名字,输出同一个结果 -
养别17278036841…… 搞个结构体 typedef struct studentInfo { int studentNumber; char name[20]; int ohters1; int other2; } studentInfo Xiaoming = { 123;xiaoming; 222; 333 } 把你要输出的结果搞成other1或者其他的东西放到结构体里; 然后把学生的数据例如名字...
@殳淑3976:c语言编写名字全拼,和学号 -
养别17278036841…… 您好,您这样:#include<stdio.h> int main() { printf("你所需要写的学号,姓名,班级,电子邮箱\n"); return 0; }
@殳淑3976:C语言中,怎么样输入:学号,姓名,联系方式,输出预定的参数呢?知道的解答下,谢谢了~! -
养别17278036841…… /*以后学到结构体就来的简单了*/ #include "stdio.h" #define MAXLEN 15 struct stu { char num[MAXLEN]; char name[MAXLEN]; char tel[MAXLEN]; }; void ReadIn(struct stu *stu) { printf("请输入学号:"); scanf("%s",stu->num); printf("...
@殳淑3976:程序每次运行输出随机的学号和姓名 运用c语言 -
养别17278036841…… 这种类数据多采用学号作为关键字,那么可以采用随机数函数rand();来产生一个随机信号.rand()%M+N; (M为学生数目,N为最小学号数),即可产生一个随机学号,根据学号检索姓名就可以了.rand的调用要初始化,调用之前先执行srand();这两个函数的头文件为#include<stdlib.h>#include<stdio.h>#include<stdlib.h> void main() { int b; srand(34);//34为种子数,可以为任意值 b=rand()%M+N; }
@殳淑3976:c语言 .用结构体输出学生姓名、学号和成绩 我有c++的程序 但是看不懂 只会c语言 -
养别17278036841…… C++ 中的struct与class的区别是:struct的默认访问级别是public,class 的访问级别是private.C++中的struct和class一样可以有成员函数(上面代码中的 void show是成员函数;Student(char *name, char *id, int grade)是一个特殊的成员函数,叫构...