嗨我写这段代码有程序,同时使用小于 100 的随机整数 => 除函数,返回 qoutient 和余数并将它们打印在输出中,但似乎我不工作,请你帮忙哪部分是错的。
#include <cstdlib>
#include <iostream>
#include <ctime>
using namespace std;
using namespace std;
int division(int& remainder,int qoutient)
{
int dividant;
int divisor;
int quotient=dividant/divisor;
int remainder=dividant%divisor;
}
int main()
{
int dividant =(rand()%99);
int divisor =(rand()%99);
int qoutient;
int remainder_result;
srand(time(NULL));
do{qoutient=division(dividant,divisor);
cout<<"this is q:"<<qoutient<<endl;
cout<<"remainder"<<remainder_result<<endl;}
while(dividant>divisor);
}