100% MATLAB OCTAVE prog to get 1098 always ఐకమత్యమే_మహాబలము
clc
clear all
okaTla=floor(rand*8) %to geerate a integer in the range [0, 7]
padula=floor(rand*10)
temp=okaTla+2:9
length_temp=length(temp)
tatkal=ceil(rand*length_temp)
vandala=temp(tatkal)
asalu=100*vandala+10*padula+okaTla
tiragEsi=100*okaTla+10*padula+vandala
teesESaka=asalu-tiragEsi
%%k_vandala=(uint8) (floor(teesESaka/100))
k_vandala= (teesESaka-mod(teesESaka,100))/100
k_okaTla=mod(teesESaka,10)
k_padula=(teesESaka-k_vandala*100-k_okaTla)/10
tippitE=100*k_okaTla+10*k_padula+k_vandala
kalipitE=teesESaka+ tippitE
clear all
okaTla=floor(rand*8) %to geerate a integer in the range [0, 7]
padula=floor(rand*10)
temp=okaTla+2:9
length_temp=length(temp)
tatkal=ceil(rand*length_temp)
vandala=temp(tatkal)
asalu=100*vandala+10*padula+okaTla
tiragEsi=100*okaTla+10*padula+vandala
teesESaka=asalu-tiragEsi
%%k_vandala=(uint8) (floor(teesESaka/100))
k_vandala= (teesESaka-mod(teesESaka,100))/100
k_okaTla=mod(teesESaka,10)
k_padula=(teesESaka-k_vandala*100-k_okaTla)/10
tippitE=100*k_okaTla+10*k_padula+k_vandala
kalipitE=teesESaka+ tippitE
okaTla = 2 padula = 0 temp = 4 5 6 7 8 9 length_temp = 6 tatkal = 3 vandala = 6 asalu = 602 tiragEsi = 206 teesESaka = 396 k_vandala = 3 k_okaTla = 6 k_padula = 9 tippitE = 693 kalipitE = 1089
కామెంట్లు
కామెంట్ను పోస్ట్ చేయండి
దయచేసి మీ సలహాలను సూచనలను స్పష్టంగా పేర్కొనగలరు. plz see that ur comments are 'acceptable' in a value based society.