63 227
Assignments Done
Successfully Done
In July 2018

Answer to Question #21844 in C# for tofik mohamed

Question #21844
write a static method with one integer parameter and let it return the remainder of that integer when divided by 7. for example,findremainder(19)should return 5.in the main method, initilalize two variables, x and ,with values 73 and 16.call the find remainder method three times,with the argument x,y and x+y,each time displaying the result returned by findremainder.
Additionally, illustrate how the unary operators ++ and -- work, each being placed before and after the variable name. Apply those operators to the variables x and y described in the exercise (you will need to make additional FindRemainder calls).
Expert's answer
& static int findReminder(int x)
& {
return x % 7;
& }
static void Main(string[] args)
& {
int x = 73;
int y = 16;

& //The ++ operation is called "increment"
//It increases the variable's value& by 1. Prefix and postfix form has some differences
//Firstly the variable is used and then increases
//Firstly the variable increases and then is used

//The -- operation is called "decrement"
//It reduces the variable's value by 1.
//The difference between postfix and prefix form is similar to increment operation
& }

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions