QQ网名大全

编写一个程序,要求输入名字和姓,之后在一行输出姓名,在下一行打印每个名字字母的个数。名字和个数打印

展开全部#include
include
int main(int length,char*args)
{
char firstname[1024];char lastname[1024];scanf("%s%s",lastname,firstname);int flen=strlen(firstname);int llen=strlen(lastname);printf("%s%s\n",firstname,lastname);printf("%-*d%-*d\n",flen,flen,llen,llen);printf("%s%s\n",firstname,lastname);printf("%*d%*d\n",flen,flen,llen,llen);}
佚名
2024-11-05 18:49:38
最佳回答
类似问题(10)