c输入姓名年龄并输出
@咸桑6709:急!急!!急!!编写C语言程序,输入一人的生日,并输入当前的日期,输出该人的实际年龄. -
万独18321425619…… 我给你写的不仅能显示年龄而且能显示距现在的天数.当前日期无需输入,程序自动调取系统日期..运行过了没有任何问题.有什么问题可以交流下. #include <stdio.h> #include<time.h> //计算给定的日期是本年的第几天 int count(int year,int ...
@咸桑6709:/编写一个程序,输入n个学生的姓名和出生日期,并按年龄从大到小输出.(用c语言编写) #include<stdio.h> # -
万独18321425619…… #include<stdio.h> int main() { int n,i,j,index; struct std{ char name[10]; int day; }student[10],s; printf("请输入n,n<=10\n"); scanf("%d",&n); for(i=0;i<n;i++){ printf("请输入名字和出生日期"); scanf("%s%d",student[i].name,&student[i]...
@咸桑6709:c++编程从键盘中输入一个姓名,并且输入一个年龄. -
万独18321425619…… #include #include using namespace std; void main(){ string name; int age; cout<<"input your name and age:"; cin>>name>>age; ofstream outobj("data.txt"); outobj<<"我叫"<<<",今年"<<<",未婚."; outobj.close(); }
@咸桑6709:用C语言编写程序:输入一个人的名字、年龄、工资并在最后输出来. -
万独18321425619…… struct imfomation{ char name[20]; int age; int salary; }; #include "stdio.h" void main() { struct imfomation a;//a为结构体变量 printf("请输入姓名:\n"); gets(a.name); printf("请输入年龄:\n"); scanf("%d",&a.age); printf("请输入工资:\n"); scanf("%d",&a.salary); printf("姓名:%s\n年龄:%d\n工资:%d\n",a.name,a.age,a.salary); }
@咸桑6709:用c语言程序编写 年龄 姓名 输出年龄和姓名 年龄可以变化 -
万独18321425619…… #include <stdio.h> #include <stdlib.h> int main() { typedef struct { unsigned short age; char name[9]; } person; person zhangsan; scanf("%d,%s",zhangsan.age,zhangsan.name); printf("%d\n%s",zhangsan.age,zhangsan.name); system("pause"); return 0; }
@咸桑6709:c语言程序:输入n个代表的姓名,工作单位及年龄,输出排除不合格代表后所剩下的所有代表的数据! -
万独18321425619…… #include "stdio.h" #include <string.h> #define N 10 struct deputy{ char name[20]; char unit[50]; int age; } everyone[N]; void main() { int i,j,k,num=0; for(i=0;i<N;i++) { printf("第%d个代表的信息(姓名 工作单位 年龄):\n",i+1); scanf("%...
@咸桑6709:用c++在命令提示符上输出姓名,年龄 -
万独18321425619…… #include<iostream> #include<string> using namespace std; int main() { string name="dsfssfd";int age=12;cout<<"name:"<<name<<endl;cout<<"age:"<<age<<endl; }
@咸桑6709:c++:输入姓名,年龄,按按钮实现输出你的姓名和明年的年龄 -
万独18321425619…… 按年龄大小输出我是没能力办到了; #include <iostream> #include <string> using namespace std; #define max 100 class student{ private: string name; string age; public: student(string name="\0",string age="\0"){ name=name; age=age; } ...
@咸桑6709:c语言编程:输入学生信息(姓名,年龄,分数),并按照分数由高到低输出. -
万独18321425619…… 去百度文库,查看完整内容> 内容来自用户:Mrbabyface 输入学生信息(姓名,年龄,分数),并按照分数由高到低输出. # include # include struct student {int age; float score; char name[100]; }; input_stlen(int *num) { printf("请输入学生总...
@咸桑6709:用C语言输出学生信息,输出学生本人的学号、姓名、年龄、班级等信息(定义变量后输出) -
万独18321425619…… #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:"); ...
万独18321425619…… 我给你写的不仅能显示年龄而且能显示距现在的天数.当前日期无需输入,程序自动调取系统日期..运行过了没有任何问题.有什么问题可以交流下. #include <stdio.h> #include<time.h> //计算给定的日期是本年的第几天 int count(int year,int ...
@咸桑6709:/编写一个程序,输入n个学生的姓名和出生日期,并按年龄从大到小输出.(用c语言编写) #include<stdio.h> # -
万独18321425619…… #include<stdio.h> int main() { int n,i,j,index; struct std{ char name[10]; int day; }student[10],s; printf("请输入n,n<=10\n"); scanf("%d",&n); for(i=0;i<n;i++){ printf("请输入名字和出生日期"); scanf("%s%d",student[i].name,&student[i]...
@咸桑6709:c++编程从键盘中输入一个姓名,并且输入一个年龄. -
万独18321425619…… #include #include using namespace std; void main(){ string name; int age; cout<<"input your name and age:"; cin>>name>>age; ofstream outobj("data.txt"); outobj<<"我叫"<<<",今年"<<<",未婚."; outobj.close(); }
@咸桑6709:用C语言编写程序:输入一个人的名字、年龄、工资并在最后输出来. -
万独18321425619…… struct imfomation{ char name[20]; int age; int salary; }; #include "stdio.h" void main() { struct imfomation a;//a为结构体变量 printf("请输入姓名:\n"); gets(a.name); printf("请输入年龄:\n"); scanf("%d",&a.age); printf("请输入工资:\n"); scanf("%d",&a.salary); printf("姓名:%s\n年龄:%d\n工资:%d\n",a.name,a.age,a.salary); }
@咸桑6709:用c语言程序编写 年龄 姓名 输出年龄和姓名 年龄可以变化 -
万独18321425619…… #include <stdio.h> #include <stdlib.h> int main() { typedef struct { unsigned short age; char name[9]; } person; person zhangsan; scanf("%d,%s",zhangsan.age,zhangsan.name); printf("%d\n%s",zhangsan.age,zhangsan.name); system("pause"); return 0; }
@咸桑6709:c语言程序:输入n个代表的姓名,工作单位及年龄,输出排除不合格代表后所剩下的所有代表的数据! -
万独18321425619…… #include "stdio.h" #include <string.h> #define N 10 struct deputy{ char name[20]; char unit[50]; int age; } everyone[N]; void main() { int i,j,k,num=0; for(i=0;i<N;i++) { printf("第%d个代表的信息(姓名 工作单位 年龄):\n",i+1); scanf("%...
@咸桑6709:用c++在命令提示符上输出姓名,年龄 -
万独18321425619…… #include<iostream> #include<string> using namespace std; int main() { string name="dsfssfd";int age=12;cout<<"name:"<<name<<endl;cout<<"age:"<<age<<endl; }
@咸桑6709:c++:输入姓名,年龄,按按钮实现输出你的姓名和明年的年龄 -
万独18321425619…… 按年龄大小输出我是没能力办到了; #include <iostream> #include <string> using namespace std; #define max 100 class student{ private: string name; string age; public: student(string name="\0",string age="\0"){ name=name; age=age; } ...
@咸桑6709:c语言编程:输入学生信息(姓名,年龄,分数),并按照分数由高到低输出. -
万独18321425619…… 去百度文库,查看完整内容> 内容来自用户:Mrbabyface 输入学生信息(姓名,年龄,分数),并按照分数由高到低输出. # include # include struct student {int age; float score; char name[100]; }; input_stlen(int *num) { printf("请输入学生总...
@咸桑6709:用C语言输出学生信息,输出学生本人的学号、姓名、年龄、班级等信息(定义变量后输出) -
万独18321425619…… #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:"); ...