Click here to Skip to main content
15,888,277 members
Home / Discussions / C#
   

C#

 
QuestionRe: How to install windows service? Pin
Chesnokov Yuriy15-Nov-09 5:04
professionalChesnokov Yuriy15-Nov-09 5:04 
AnswerRe: How to install windows service? Pin
N a v a n e e t h15-Nov-09 14:44
N a v a n e e t h15-Nov-09 14:44 
QuestionRe: How to install windows service? Pin
Chesnokov Yuriy15-Nov-09 19:23
professionalChesnokov Yuriy15-Nov-09 19:23 
AnswerRe: How to install windows service? Pin
PIEBALDconsult15-Nov-09 5:50
mvePIEBALDconsult15-Nov-09 5:50 
QuestionWeb Services Pin
Brink Fourie15-Nov-09 2:12
Brink Fourie15-Nov-09 2:12 
AnswerRe: Web Services Pin
OriginalGriff15-Nov-09 2:24
mveOriginalGriff15-Nov-09 2:24 
GeneralRe: Web Services Pin
Brink Fourie15-Nov-09 3:31
Brink Fourie15-Nov-09 3:31 
GeneralRe: Web Services Pin
OriginalGriff15-Nov-09 4:42
mveOriginalGriff15-Nov-09 4:42 
Brink Fourie wrote:
the output for the console?

That I've got to see! "For security, all console output has been sorted into alphabetical order..." Laugh | :laugh:

Brink Fourie wrote:
Web Service:
The web service must expose two methods which will each multiply or add two integers.
The methods must return an integer value, specifying the result. Call methods "Multiply" and "add"
for example, when passing the integer 3 and 8 to Multiply method, it should return 24.?


so, the strucure is easy:
public int Add(int p1, int p2)
   {
   return p1 + p2;
   }

and the same for multiply - but you knew that or it wouldn't be a final exam...

Brink Fourie wrote:
Client:
A console client that let the user input an integer.
The user must also specify whether to multiply or add. Then using the algorithm described below, process the number by calling
the Web service methods to obtain a result.
Example-
input = 5
if user choose to multiply, the following should be performed:
5 x 4 x 3 x 2 x 1
the result is
120

if the user choose to add, the following should be performed:
5 + 4 + 3 + 2 + 1
the result is
15?
A loop in the main program should be used, and each iteration the appropriate Web method should be called.


So the progam logic is along the lines of:
1) read in a number
2) decide wether to add or multiply (assume Add for this example)
3) set temporary variable "result" to zero.
4) loop while input greater than zero.
5) each time round the loop, add input to result, and then reduce input by one.
6) print result.

What's the bit you are having problems with?

No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.

This message is made of fully recyclable Zeros and Ones

"Rumour has it that if you play Microsoft CDs backwards you will hear Satanic messages.Worse still, is that if you play them forwards they will install Windows"

GeneralRe: Web Services Pin
Brink Fourie15-Nov-09 5:05
Brink Fourie15-Nov-09 5:05 
GeneralRe: Web Services Pin
OriginalGriff15-Nov-09 5:26
mveOriginalGriff15-Nov-09 5:26 
GeneralRe: Web Services Pin
Brink Fourie15-Nov-09 5:36
Brink Fourie15-Nov-09 5:36 
GeneralRe: Web Services Pin
Brink Fourie15-Nov-09 5:36
Brink Fourie15-Nov-09 5:36 
QuestionWindows Form GridView Pin
moody12314-Nov-09 23:09
moody12314-Nov-09 23:09 
AnswerRe: Windows Form GridView Pin
binhvtt14-Nov-09 23:34
binhvtt14-Nov-09 23:34 
GeneralRe: Windows Form GridView Pin
moody12315-Nov-09 0:42
moody12315-Nov-09 0:42 
GeneralRe: Windows Form GridView Pin
binhvtt15-Nov-09 14:54
binhvtt15-Nov-09 14:54 
QuestionDifference B/w 3 types of Lines. Pin
lexical114-Nov-09 21:50
lexical114-Nov-09 21:50 
AnswerRe: Difference B/w 3 types of Lines. Pin
OriginalGriff14-Nov-09 21:56
mveOriginalGriff14-Nov-09 21:56 
GeneralRe: Difference B/w 3 types of Lines. Pin
binhvtt14-Nov-09 23:41
binhvtt14-Nov-09 23:41 
GeneralRe: Difference B/w 3 types of Lines. Pin
lexical115-Nov-09 2:47
lexical115-Nov-09 2:47 
GeneralRe: Difference B/w 3 types of Lines. Pin
binhvtt15-Nov-09 14:59
binhvtt15-Nov-09 14:59 
AnswerRe: don't use CreateGraphics Pin
Luc Pattyn14-Nov-09 23:39
sitebuilderLuc Pattyn14-Nov-09 23:39 
GeneralRe: don't use CreateGraphics Pin
lexical115-Nov-09 2:34
lexical115-Nov-09 2:34 
QuestionRefresh database using c# Pin
tasumisra14-Nov-09 20:02
tasumisra14-Nov-09 20:02 
AnswerRe: Refresh database using c# Pin
Shameel14-Nov-09 22:17
professionalShameel14-Nov-09 22:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.