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
0
Answer:
output of y is 1
output of m is 4
output of D is 1
Answered by
1
- Write the output of the following code snippet (Language:- GW-BASIC)
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.
Similar questions