Hi
I have to do this exercise for school, but i just dont know how to create this, so if anyone from you can please do this for me, i will be very thankful. It is a short one and quite simple(not for me):

"Write a program, which reads from numbers.dat numbers from 2000 to 3000. Between readable numbers find and printout the number with highest sum of numerical digits."

Thanks

2
Contributors
5
Replies
6
Views
11 Years
Discussion Span

have you wrote some code? post it here

the ideea is to have a cycle to read the numbers, after the number is read with another cycle you make the sum of it's digits

best regards,

Hi
Thanks for your answers, i was trying this with "varying" and no success at all. As im a complete rookie in this and need to do this for school by tomorrow, i would kindly ask you if you can write me the whole code, if its okay with you. I tried to do this, but i never get any success.

Hi
Thanks for your answers, i was trying this with "varying" and no success at all. As im a complete rookie in this and need to do this for school by tomorrow, i would kindly ask you if you can write me the whole code, if its okay with you. I tried to do this, but i never get any success.

so, for tomorrow...and when you expect to learn some programming? this is cheatting!
i will give you some instructions, but i can not give all the code, is not fair!

num:=2100;
while (num<3000)and(num>2000) do