Open Flyces opened 1 year ago
Maybe you can try to use "%s" to stand for format string. And also you need to define "n" by "char n[number]". Following is a demo which you need input a string and then it will return a sentence ,you can try to run.
#include<stdio.h>
int main()
{
char n[8] ;
printf("Please put in your name:");
scanf("%s",&n);
printf("Nice to meet you,%s!\n",n);
return 0;
}
include
include
int main() { long long x,z; int y; printf("please put in your roll number:"); scanf("%lld",&x); printf("please put in your birthed year:"); scanf("%d",&y); printf("if you want to get the information,you must put in your telephone number!\n"); scanf("%lld",&z); y=2023-y; printf("please wait a few minutes.....\n"); Sleep(3000); printf("your roll mumber is %lld\n",x); printf("your age is %d\n",y); printf("your phonemumber is %lld",z); return 0; }