- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Hello mates! I have one problem with Math Utility Test for PrimeNumber case. The code is: [CODE]public bool IsPrimeNumber(int n) { int i = 0, num = 0; while (i <= n) { if ((n % i) == 0) num = num + 1; i = i + 1; } … |
|
Hi, How to make at code that calculator will operate with 3 numbers (Example: 15 - 2 * 5) and that [U]multiplication and division[/U] have precedence over [U]addition and subtraction[/U] ? At that code it operates just with 2 numbers: [CODE] int num1; int num2; string operand; float answer; Console.Write("Please … |
|
Hello, Why break function doesn't work at that code ?: [CODE]double Number = 0, counter = 0; // declare here. for (int i = 1; i <= 10; i++) { //Entering ten numbers Console.Write("Enter the number:"); Number += double.Parse(Console.ReadLine()); //keep incrementing number /*If user write number 0 in console before … |
|
Hello, Do anyone know how to continue the loop to get an average of entered numbers: [code] //Using loop to enter the numbers for (int i = 1; i <= 10; i++) { //Entering ten numbers Console.Write("Enter the number:"); int Number = int.Parse(Console.ReadLine()); /*If user write number 0 in console … |
|
Hello, I have a problem with coding circumscribed rectangle in C# [B]console application[/B]. Whith that code i get just filled rectangle which is not correct fot my task: [code] //Entering dimensions of the rectangle Console.Write("Enter the height of the rectangle: "); int Height = int.Parse(Console.ReadLine()); Console.Write("Enter the width of the … |