summaryrefslogtreecommitdiff
path: root/1553/CH2/EX2.20/2Ex20.sce
blob: 2f174a51306b3811baad79ab549308827cb4641e (plain)
1
2
3
4
5
6
7
8
9
//chapter 2 Ex 20
clc;
clear;
close;
n1=5; n2=6; n3=7; n4=8; rem=3;
n=lcm(int32([n1,n2,n3,n4]));
k=2;
num=n*k+rem; //the number is in the form of (quotient*dividend+remainder)
mprintf("The least such number is %d",num);