Turbo pascal

i need help

Page 1 of 1

3 Replies - 1083 Views - Last Post: 06 May 2009 - 07:44 AM Rate Topic: -----

#1 anna zande  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 05-May 09

Turbo pascal

Post icon  Posted 05 May 2009 - 02:21 PM

hello, well i need some help. So the problem is i have to do my homework and i just can't do it. My task is:
Task

Entered natural numbers A (which digital amount is less then 250) and N (1<N<10000) to calculate a remain, what appears a number A divides with N.

In number A is the text file division.in first turn given, but in the second - number N cost.

In the text file division.out unique turn out remain, what appears A divides with N, cost.


Please please help me :(

This post has been edited by anna zande: 06 May 2009 - 06:17 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Turbo pascal

#2 erik.price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 485
  • View blog
  • Posts: 2,690
  • Joined: 18-December 08

Re: Turbo pascal

Posted 05 May 2009 - 04:53 PM

Please don't put your email in the threads unless you want to be spammed.

[rules][/rules]
Was This Post Helpful? 0
  • +
  • -

#3 anna zande  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 05-May 09

Re: Turbo pascal

Posted 06 May 2009 - 06:20 AM

program atlikums;
var A,N:integer;
f1,f2:text;
begin
assign(f1,'atlikums.in');
assign(f2,'atlikums.out');
reset(f1);
readln(f1,A);
readln(f1,N);
rewrite(f2);
write(f2,A mod N);
close(f1);
close(f2);
end.



But i don't know how to use "string" or "char" :/
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6066
  • View blog
  • Posts: 23,526
  • Joined: 23-August 08

Re: Turbo pascal

Posted 06 May 2009 - 07:44 AM

I would suggest reading your book or notes about "how to use string or char." That is what you're in school for, isn't it? To learn?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1