please use MatLab The sixdigit number 63X90Y is an even mult


please use MatLab

The six-digit number 63X90Y is an even multiple of 27. What digits do X and Y represent? (Show the MATLAB code used.)

Solution

MATLAB CODE

clear all
clc
num=\'63X90Y\';
set=0;
for i=0:2:8
temp=num;
temp(end)=num2str(i);
for j=0:9
if(mod(i+j,9)==0)
temp(3)=num2str(j);
no=str2num(temp);
if(mod(no,27)==0)
fprintf(\'\ \ X=%d\ Y=%d\',j,i);
fprintf(\'\ The number is %d\ \',no);
set=1;
break;
end
end
end
end

OUTPUT

X=9

Y=0
The number is 639900


X=7
Y=2
The number is 637902


X=5
Y=4
The number is 635904


X=3
Y=6
The number is 633906


X=1
Y=8
The number is 631908

 please use MatLab The six-digit number 63X90Y is an even multiple of 27. What digits do X and Y represent? (Show the MATLAB code used.)SolutionMATLAB CODE clea

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site