首页 > 解决方案 > 是否可以在c的消息框中添加变量?

问题描述

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

int main()
{
    char a[20], c[10], d[10];
    int b;
    printf("What is your name: ");
    scanf("%s",&a);
    printf("How old are you: ");
    scanf("%d",&b);
    printf("Where are you from: ");
    scanf("%s",&d);
    printf("What is your Profession: ");
    scanf("%s",&c);



    MessageBox(0, "My name is" " I am  %s years old. I am from %s. I am a %s. "
              , "Message",1);
    return 0;
}

所以我正在尝试制作一个程序,让用户提出问题并在消息框中打印句子。甚至可能......?

标签: c

解决方案


推荐阅读