安河桥和安河桥的区别:编写程序,求当x=5,y=8时,小于等于(x/66)×[(y+1)x-2+78]的最大的整数,在窗体上打印其结果

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/27 16:23:49
如上所述,在线等
要VB的,不好意思,C语言的朋友辛苦了

我写的这个就是VB的:

Dim x, y As Integer
x = 5
y = 8
Print Int((x / y) * ((y + 1) * -2 + 78))

float x=5,y=8;
int r=(int)(x/66)*((y+1)x-2+78)

cout<<"the result is:"<<r<<endls;

sub maxinteger
{
my $first = shift;
my $second = shift;
print "The result is :",
int((x/66)*((y+1)*x-2+78)),"\n";
}
一个perl函数
c++实现为

#include <iostream.h>
void main{
float x=5,y=8;
int r=(int)(x/66)*((y+1)*x-2+78)
cout<<"The max interger is :"<<r<<endl;
}