You are viewing our Forum Archives. To view or take place in current topics click here.
Wondering if anyone could help me with Pascal?
Posted:
Wondering if anyone could help me with Pascal?Posted:
Status: Offline
Joined: Apr 17, 201113Year Member
Posts: 654
Reputation Power: 31
Hey guys, just wondering if anyone could help me with my Pascal and Delphi text book.
I know Pascal isn't the most popular of languages but it's start.
I'm currently working through a text-book called "Learning to Program in Pascal and Delphi" and currently working on Exercise 2.4, I'm using the program "Delphi XE" aswell to work through the book.
I'm stuck on the question at the moment and was wondering if anyone could help me and explain what I should do if I come across a question like this again.
The question is as follows:
x DIV y calculates how many times y divides into x, for example 7 DIV 3 is 2.
x MOD y calculates the remainder that results after division, for example 7 MOD 3 is 1. Write a program that will read in two integers Number1 and Number2. Using DIV and MOD, your program should display the whole number part and the remainder of dividing Number1 by Number2. Make the display easy to understand for the user.
If anyone could help explain how to do this to me I would appreciate it alot! If you could also provide an example in the code view that would be even better! Hopefully someone out there will be able to help me, thanks for reading this even if not.
I know Pascal isn't the most popular of languages but it's start.
I'm currently working through a text-book called "Learning to Program in Pascal and Delphi" and currently working on Exercise 2.4, I'm using the program "Delphi XE" aswell to work through the book.
I'm stuck on the question at the moment and was wondering if anyone could help me and explain what I should do if I come across a question like this again.
The question is as follows:
x DIV y calculates how many times y divides into x, for example 7 DIV 3 is 2.
x MOD y calculates the remainder that results after division, for example 7 MOD 3 is 1. Write a program that will read in two integers Number1 and Number2. Using DIV and MOD, your program should display the whole number part and the remainder of dividing Number1 by Number2. Make the display easy to understand for the user.
If anyone could help explain how to do this to me I would appreciate it alot! If you could also provide an example in the code view that would be even better! Hopefully someone out there will be able to help me, thanks for reading this even if not.
#2. Posted:
Status: Offline
Joined: Aug 27, 201113Year Member
Posts: 227
Reputation Power: 8
Status: Offline
Joined: Aug 27, 201113Year Member
Posts: 227
Reputation Power: 8
I'm not really sure, I think its asking you to make a program that uses the two tags 'DIV' and 'MOD' to display the outputs. Like ask the user to input two numbers, then use them tags to display the outputs. If you get what I mean. Just PM me if you need more help.
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Apr 17, 201113Year Member
Posts: 654
Reputation Power: 31
Yeah I understand what I have to do, I need to create a program that can divide two integers and ALSO display the remainders from numbers that don't divide evenly. The problem is I don't know where to use the DIV and MOD variables..
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.