473,388 Members | 1,499 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

how to solve those java expressions??

[b]1. (int) 'B' / 7 + (double)( 8 / 3 ) = ???

2. 111 - 32 * 4 + (double)( 17 % 5 ) = ???

3. (double) 'Z' / 50 + (int) 2.4 * 25 = ???

4. 36 / 7 + 2 - 45 % 12 + 3 * 2 = ???

5. (char)((int) 's' / 3 % 5 + 50 ) = ???

6. ( 8 + 9 * 2 ) / 5 - ( 16 - 17 % 21) = ???

PLEASE I NEED THE ANSWERS RIGHT AWAY PLEASE SOMEONE WHO IS REALLY SMART!!!
Sep 20 '07 #1
4 1875
stack
40
[b]1. (int) 'B' / 7 + (double)( 8 / 3 ) = ???

2. 111 - 32 * 4 + (double)( 17 % 5 ) = ???

3. (double) 'Z' / 50 + (int) 2.4 * 25 = ???

4. 36 / 7 + 2 - 45 % 12 + 3 * 2 = ???

5. (char)((int) 's' / 3 % 5 + 50 ) = ???

6. ( 8 + 9 * 2 ) / 5 - ( 16 - 17 % 21) = ???

PLEASE I NEED THE ANSWERS RIGHT AWAY PLEASE SOMEONE WHO IS REALLY SMART!!!
All you need is an operator precedence table.
Are you smart enough to find one?

:-)
Sep 20 '07 #2
dmjpro
2,476 2GB
Expand|Select|Wrap|Line Numbers
  1. 1. (int) 'B' / 7 + (double)( 8 / 3 ) = ???
  2.  
  3. 2. 111 - 32 * 4 + (double)( 17 % 5 ) = ???
  4.  
  5. 3. (double) 'Z' / 50 + (int) 2.4 * 25 = ???
  6.  
  7. 4. 36 / 7 + 2 - 45 % 12 + 3 * 2 = ???
  8.  
  9. 5. (char)((int) 's' / 3 % 5 + 50 ) = ???
  10.  
  11. 6. ( 8 + 9 * 2 ) / 5 - ( 16 - 17 % 21) = ???
  12.  
PLEASE I NEED THE ANSWERS RIGHT AWAY PLEASE SOMEONE WHO IS REALLY SMART!!!
Welcome to TSDN.
Use code tags while you do post.
Write the program with these expression and understand by yourself.
If then you get stuck then come here with your specific problem.
Experts are here to make you understand.
Good Luck.

Kind regards,
Dmjpro.
Sep 20 '07 #3
Nepomuk
3,112 Expert 2GB
All you need is an operator precedence table.
Are you smart enough to find one?

:-)
With those characters, a ASCII- or Unicode-Table would be a good idea too! ^^

Greetings,
Nepomuk
Sep 20 '07 #4
stack
40
With those characters, a ASCII- or Unicode-Table would be a good idea too! ^^

Greetings,
Nepomuk

I agree.. :-)

Kind regards,
stack
Sep 21 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

73
by: RobertMaas | last post by:
After many years of using LISP, I'm taking a class in Java and finding the two roughly comparable in some ways and very different in other ways. Each has a decent size library of useful utilities...
6
by: John Smith | last post by:
Hello, I have a rather odd question. My company is an all java/oracle shop. We do everything is Java... no matter what it is... parsing of text files, messaging, gui you name it. My question...
1
by: pawel | last post by:
I have made some comparision C# to Java RegularExpression. The problem was to find out if the rule match some text. Matching were done for precompiled regular expressions, in 100000 iterations...
31
by: somebody | last post by:
No, I'm not a troll, just angry. I just started learning C++, and find it extremely lacking compared to Java. For example, I had to write my own functions to do something as simple as a case...
11
by: rajarao | last post by:
hi I want to remove the content embedded in <script> and </script> tags submitted via text box. My java script should remove the content embedded between <script> and </script> tag. my current...
458
by: wellstone9912 | last post by:
Java programmers seem to always be whining about how confusing and overly complex C++ appears to them. I would like to introduce an explanation for this. Is it possible that Java programmers...
34
by: Anthony Irwin | last post by:
Hi All, I am currently trying to decide between using python or java and have a few quick questions about python that you may be able to help with. #1 Does python have something like javas...
2
by: jtanz0 | last post by:
Im fairly new to java programming although i have some experience in python. I have to create a calculator program (command line) which takes as input a mathematical expression consisting of...
318
by: King Raz | last post by:
The shootout site has benchmarks comparing different languages. It includes C# Mono vs Java but not C# .NET vs Java. So I went through all the benchmark on the site ... ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.