Hi guys!
I am currently taking up C# programming on our school..
Our instructor gave us a homework to work with..
The problem are:
1.) To get the exponential product of the two input integer values using any loops (for loop, while or do while).
Ex:
Input integer value: 2
Input Exponent: 3
Output >>> 8
2.) To get the square root of the input value using any loops (for loop, while or do while)..
Ex:
Input Value: 25
Square root : 5
I need it ASAP..
Thank you guys!
C# Homework - Need Help
Page 1 of 15 Replies - 205 Views - Last Post: 01 July 2012 - 06:27 AM
Replies To: C# Homework - Need Help
#2
Re: C# Homework - Need Help
Posted 30 June 2012 - 09:04 PM
This is not a homework writing service. How about you put some effort in.
#3
Re: C# Homework - Need Help
Posted 01 July 2012 - 12:03 AM
#4
Re: C# Homework - Need Help
Posted 01 July 2012 - 02:31 AM
This wiki article describes various ways to calculate the square root of a number.
If you know that you will only get numbers whose square root is an integer, it becomes much simpler (though, unless you left something out, the assignment did not say that). For example you could also just brute-force it (i.e. try every number between 1 and n to see whether that number's square is equal to n) - assuming efficiency is not a concern.
If you know that you will only get numbers whose square root is an integer, it becomes much simpler (though, unless you left something out, the assignment did not say that). For example you could also just brute-force it (i.e. try every number between 1 and n to see whether that number's square is equal to n) - assuming efficiency is not a concern.
#5
Re: C# Homework - Need Help
Posted 01 July 2012 - 03:44 AM
#6
Re: C# Homework - Need Help
Posted 01 July 2012 - 06:27 AM
Quote
I don't know what to type. What do I put in the code to make it do x,yz
That's not going to fly around here. You have to at least try. We don't expect it to be right all the time. If it were right you wouldn't have a question. If you have no code, there is nothing for us to help you with. You really do have to look in your textbook at the examples. Follow the examples. Look at the syntax and copy it into your program. Then adjust as needed to fit the assignment. If you make an effort, we will too.
90% or more of the problems we see here are because rookies don't stop and plan nor block out their code into logical segments.
This article should help you see a way to block out your code by stubbing out the methods and logic, then filling in each method as you research it:
This is the 'Help me with my homework' article you wanted.
I don't want you to write my code, just give me ideas on how to solve my problem. - Read this article
Page 1 of 1
|
|

New Topic/Question
This topic is locked



MultiQuote







|