The Student Room Group

computer science, please a quick help guys

Calculate the following :
Exercise 3.1
695 % 20
7 + 6 * 5
248 % 100 / 5
6 + (18 % (17 - 12))

Exercise 3.2
(1 + 2) * 3 + 4 =
24 / 2 * 4 =
5 + 4 % 7 / 2 =
5 + 4 % (7 / 2) =

Exercise 3.3
Integer z, y=-3
z= 8 (3 + 7 / 2) + 3 * - y

Exercise 3.4
Given integer variables a, b, c, d, and e, where a = 1, b = 2, c = 3, d = 4,
evaluate the following expressions:
1 + a * b % c
a + d % b - c
e = d + c / b - a
This isn't even computer science, this is basic arithmetic. What are you struggling to understand?
Original post by Meltboy7778
This isn't even computer science, this is basic arithmetic. What are you struggling to understand?

hun i know it's weird but this is what computer science includes.
i don't know how to solve it perfectly, everytime i try to solve it i come up with a diff answer
Reply 3
Original post by meelafotaibi
hun i know it's weird but this is what computer science includes.
i don't know how to solve it perfectly, everytime i try to solve it i come up with a diff answer

You can't come up "with a diff answer" every time because the rules for operator priority are well defined so there is only a single answer.

This isn't a homework service so people aren't going to give you the answers - why not post a couple of your results and someone can check them for you? :smile:

Quick Reply

Latest

Trending

Trending