Go to Post OPR will not get you to Einstein - Paul Copioli [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 17-04-2006, 12:05
lesmayers lesmayers is offline
Registered User
no team
 
Join Date: Apr 2006
Location: kent
Posts: 2
lesmayers is an unknown quantity at this point
Calculative help !!

Hi

My friend has a problem with this delphi code..
She wants a set of integer numbers that people enter into boxes and results give total..Can anyone help.
This is what she has sent:

procedure TfrmAddFor.btnAddClick(Sender: TObject);
var
Number : string;
Count, Sum : integer;
begin
Count := 1;
Sum := 0;
for Count := 1 to 20 do;
Number := InputBox('Enter number', 'Number', ''); //create InputBox
Count := Count + 1;
Sum := Sum + StrToInt(Number);
lblIterationNumber.Caption := 'Iteration Number:' + Number;
lblSum.Caption := 'Cumulative Sum:' + IntToStr(Sum);
end;
end.

Tx for any help
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:21.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi