1.在visual studio中建立C++项目

  (1)新建->项目->空项目 C++

  (2)右击项目->添加->新建项->C++文件(.app)

  (3编写C++文件  

            #include<stdio.h>
             int main()
            {
               int i,j;
               scanf("%d%d",&i,&j);
               printf("i=%dj=%d",i,j);
               return 0;
             }

2.解决运行程序一闪而过问题

system("pause");/*用这个十分方便,但要注意要在程序前面加上#include<iostream>
如:

            #include<stdio.h>
            #include<iostream>
            int main()
            {
                 int i,j;
                 scanf("%d%d",&i,&j);
                 printf("i=%dj=%d",i,j);
                 system("pause");
            }

相关文章:

  • 2021-11-23
  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
  • 2021-05-30
  • 2022-01-01
  • 2021-04-13
猜你喜欢
  • 2022-12-23
  • 2022-01-09
  • 2021-05-21
  • 2021-11-05
  • 2021-06-18
  • 2021-12-24
相关资源
相似解决方案