有以下程序:
include <iostream>
using namespace std;
class sample
{
int x;
public:
void setx(int i)
{
x=i;
}
int putx ()
{
return x;
}
};
int main ( )
{
sample *p;
sample A;
A .set>:(5);
A .setx(6);
A .setx(7);
for (int j=0;j<3;j++)
{
p=&A
下列给定程序中,函数fun()的功能是计算并输出high以内的素数之和。high由主函数传给fun()函数。若high的值为 100,则函数的值为1060。
请改正程序中的错误,使它能得到正确结果。
注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。
试题程序:
include <conio.h>
include <std