Computer Science, asked by acharjeetaanusiya, 7 months ago


Grive the
output:
10 LET Day=500
20 let y = int(Day/365)
30 Let Day = Day mod 365
40 LET m=int(day/30)
50 let D = Day Mod 30
60 print y;m;d
End​

Answers

Answered by AnindaBasu
0

Answer:

output of y is 1

output of m is 4

output of D is 1

Answered by anindyaadhikari13
1

\star\:\:\:\sf\large\underline\blue{Question:-}

  • Write the output of the following code snippet (Language:- GW-BASIC)

\star\:\:\:\sf\large\underline\blue{Solution:-}

Given Code:-

10 LET Day=500

20 let y = int(Day/365)

30 Let Day = Day mod 365

40 LET m=int(day/30)

50 let D = Day Mod 30

60 print y;m;d

End

At first, value of day is 500.

Now, Y = INT(Day/365)= 1 .....(1)

Now,

Day=Day mod 365 =500 mod 365 =135

Again,

m=INT(Day/30)=4 ........(2)

Now,

D= Day mod 30 = 135 mod 30 =15 ....(3)

From 1,2 and 3, we can say that

Output is 1 4 15.

\star\:\:\:\sf\large\underline\blue{Output:-}

  •  \boxed{ \sf \large1  \: \: 4 \:  \: 15}
Similar questions