纪检干部年度培训计划:C++填充程序,大家帮忙

来源:百度文库 编辑:高校问答 时间:2024/04/28 13:13:31
输入两个实数a,b,然后交换它们的值再输出。其中[1],[2],[3]填什么?
#include <stdio.h>
#include <iostream.h>
void main()
{ float a,b,temp;
printf(“请输入a和b的值:”);
scanf(“%d%d”, [1] );
temp=a;
[2] ;
[3] ;
cout<<“交换后,a=” <<a<< “b=” <<b<<endl;
}

(1)&a,&b
(2)a=b
(3)b=temp

(1)&a&b
(2)a=b
(3)b=temp