Question:
I need help with this program! plsease!?
Ziggs
2012-08-29 13:57:38 UTC
Create three variables, an int named myInt, and double named myDouble, and a char named myChar. Do not initialize these variables. Use three System.out.println statements to display their values. What are their values?



Declare two int variables firstInt and secondInt with the values 37 and 5. What do you think are going to be the results of the following? Display the results using five System.out.println statements.

My guess System.out.println
firstInt+secondInt
firstInt-secondInt
firstInt*secondInt
firstInt/secondInt
firstInt%secondInt

Declare a double variable called myDouble and assign it the value 98.7. Using an assignment operator, divide the variable by 7.5 and store it in the variable myDouble. Using a System.out.println statement, display the value of myDouble.



Declare an int variable called myInt and assign it the value 3.14. What error message is displayed when you try to compile this line. Make a change to the declaration so that it assigns a legal int value to the variable. Write down this line.





Declare a named constant of type int named numberOfStates. (Note: the public static final line must be outside of function main().) On the next line assign it a value of 50. What is the error message? How must you correct this?




Declare an int variable myInt and assign it the value 31+4*5-26/8%2. What do you think the value is going to be (write this down)? Display the value using a System.out.println statement. What is the value?



Declare a double variable called myDouble and assign it the value 1.0. Divide the variable by 1

3751 (a random number I picked) and then by 3.14. Then multiply the variable by 13.3751 and then by 3.14. Using a System.out.println statement, display the value of myDouble. What is its value? Try other random floating point values with numbers after the decimal point.




Declare five int variables called score1, score2, score3, score4, and score5 and assign them the values 72, 81 88, 98, and 99. Declare a variable called total and add the values of the five variables into the variable total. Declare an int variable called count and assign it the value 5. Declare a double variable called average. Divide total by count and assign its value to average. What is its value? Change the division so that it returns a double rather than an int. Write down the changed line.







Rewrite 8 so that rather than assigning values to the five int variables, the user inputs five values.


yes this is a homework question and yes I am in desperate need! I have not bought my book yet because I cannot afford one yet!!! But desperately need help with this program! I can do all my other assignments but having trouble figuring this out! Please only post if your going to help me or show me how its done! Thank you!
Three answers:
MarkF120
2012-08-29 14:11:30 UTC
No.



and shame on whoever does answer this, you have access to the internet, there is no better book on the planet.



EDIT, ok Ziggs, maybe I was a bit harsh, but I'm sure you understand why, I might have to work with you one day, I would never answer any question that was already answered on the internet with the exception of...the person reading from multiple sources on the internet (actually trying) and still not understanding.



"Look not at the vastness of the road ahead, just your next step"



Meaning, break it down, start at the first question and search until you find what you need to know, post your email and I'll send you a Java book thats an easy read(head first Java, or name one you want). I'll check back in an hour or so. You can also go through a few torrent sites, and check out theNewBoston.org for some Java tutorials, there a complete free stanford java course here: http://see.stanford.edu/see/courseinfo.aspx?coll=824a47e1-135f-4508-a5aa-866adcae1111



There is no silver bullet though, the only way to learn is to read/watch and most important practice, if you dont practice you will forget everything.
2016-12-10 10:51:17 UTC
For internet designing, the foremost language which you would understand is HTML (hypertext markup language). HTML is the muse of all internet layout, and that's the type you get your content cloth onto the internet internet site. jointly as HTML is solid at putting content cloth, curiously very boring. with the purpose to type your web pages, you will could learn CSS (cascading type sheets). With CSS, you may define how the fairly some tags in HTML look and are located. With those 2, you have got an excellent internet site. however the problem is that it is static. It does not do something. to characteristic animations and outcomes and variations on your internet site, you will could learn Javascript. Javascript is to blame for all the changing issues on your internet site. Javascript might properly be a "customer-area" scripting language. it is referred to as that because of the fact each and every of the failings it does ensue on your laptop. once you request a internet site, it gets sent to you, then Javascript does its magic. there are circumstances once you choose issues to ensue until now the internet internet site reaches you, jointly because it is nonetheless on the server. For that, we've "server-area" scripts that are in many circumstances written in very own living house page or ASP. very own living house page is a little extra typical because of the fact it is unfastened and open source, jointly as ASP is proprietary and owned with the aid of Microsoft. There are different languages, too, yet those are the foremost ones to create web pages. i'm hoping I helped.
galt_57
2012-08-29 14:13:48 UTC
Ok, you don't have a textbook, but there are many online tutorials. Have you looked at any of them? Have you tried to Google for tutorials? You did not mention what language this is to be written in.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...