2 Replies - 526 Views - Last Post: 17 September 2011 - 11:50 AM Rate Topic: -----

#1 Naitryn  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 05-February 11

Declaring two integers...

Posted 17 September 2011 - 11:39 AM

I'm sorry, but I'm completely new to C# and have only done a couple programs and, for some reason, I cannot understand what this problem is wanting me to do.

Write a program that declares two integers and initializes them to 199 and 76. Display the sum, difference, product, average, square, and remainder of the values. Rerun the application with different values.


Can someone please explain this to me in more layman's terms or give me an example of what it means? I'd be grateful with any advice please.

Is This A Good Question/Topic? 0
  • +

Replies To: Declaring two integers...

#2 CodingSup3rnatur@l-360  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 916
  • View blog
  • Posts: 921
  • Joined: 30-September 10

Re: Declaring two integers...

Posted 17 September 2011 - 11:43 AM

Hi,

It is asking you to create 2 variables that both have a data type of int, and assign 199 to one of them, and 76 to the other. You then use the values held in these variables to calculate those different quantities, perhaps using methods. Once you have written the methods to calculate the average, sum etc, you change the values held in the two integer variables, and re run the program to see the new results.

Here, here and here are basic introductions to variables and some associated terminology.


You need to have a go, show us the code you have tried, then we may be able to help you out some more :)

This post has been edited by CodingSup3rnatur@l-360: 17 September 2011 - 11:50 AM

Was This Post Helpful? 0
  • +
  • -

#3 tlhIn`toq  Icon User is offline

  • Closing in on 5,000
  • member icon

Reputation: 4928
  • View blog
  • Posts: 10,465
  • Joined: 02-June 10

Re: Declaring two integers...

Posted 17 September 2011 - 11:50 AM

See FAQ #9 for a better understanding of school assignments.

We will not provide code for homework.


FAQ (Frequently Asked Questions - Updated Sep 2011

Spoiler

This post has been edited by tlhIn`toq: 17 September 2011 - 11:50 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1