Get a simple program in "BASIC" code to run
- or -
Post a project like this2075
£20(approx. $25)
- Posted:
- Proposals: 2
- Remote
- #2096255
- Awarded
Description
Experience Level: Entry
I have a simple program that I need to get running using PC-BASIC
ref: http://robhagemans.github.io/pcbasic/index.html
The job I have is simply to get the small program listed below up and running and then deliver to me a working .BAS file.
The code is listed below along with test data that can be used to ensure the program is running correctly.
I have a number of other similar jobs that can be awarded to the right candidate upon successful completion of this one.
Cheers - Andy
*******TEST DATA***********
"How many principal attributes"
>5
"Give principal attributes alphabetically"
>APPEARANCE
>COST
>PERFORMANCE
>RELIABILITY
>SAFETY
"Give primary decisions"
>55
>70
>80
>65
*********Results from software should read*************
>Model Solution
>.33 APPEARANCE
>.27 COST
>.18 SAFETY
>.14 PERFORMANCE
>.08 RELIABILITY
**********BASIC coded Program listing starts here**************
5 PRINT CLS
100 PRINT"COMPUTER AIDED DECISION MAKING
110 PRINT"------------------------------
120 PRINT:PRINT
130 PRINT"PHASE 1 SETTING UP THE MODEL
140 PRINT"------------------------------
150 PRINT
160 INPUT"HOW MANY PRINCIPAL ATTRIBUTES ";N
170 PRINT
180 PRINT"GIVE PRINCIPAL ATTRIBUTES ALPHABETICALLY
190 PRINT
200 DIMA$(N)
210 FORJ=1TON:INPUTA$(J):NEXTJ
220 PRINT
230 PRINT"GIVE PRIMARY DECISIONS
240 PRINT
250 DIMM(N,N-1)
260 FORJ=1TON-1
270 INPUTM(1,J)
280 NEXTJ
290 PRINT
300 DIMR(N)
310 LETR(1)=1
320 FORJ=1TON-1
330 K=J+1
340 LETM(J+1,J)=100-M(1,J)
350 LETR(K)=M(J+1,J)/M(1,J)
360 NEXTJ
370 FORJ=1TON
380 LETB=B+R(J)
390 NEXTJ
400 DIMF(N)
410 FORJ=1TON
420 LETF(J)=INT((R(J)/B)*100+.5)/100
430 NEXTJ
440 PRINT
450 PRINT
460 PRINT"MODEL SOLUTION
470 PRINT"______________
480 PRINT
490 FORI=1TON-1
500 FORJ=1TON-1
510 IFF(J)=F(J+1)THEN580
520 LETT=F(J)
530 LETV$=A$(J)
540 LETF(J)=F(J+1)
550 LETA$(J)=A$(J+1)
560 LETF(J+1)=T
570 LETA$(J+1)=V$
580 NEXTJ,I
590 FORI=1TON
600 PRINTF(I),A$(I)
610 NEXTI
620 END
ref: http://robhagemans.github.io/pcbasic/index.html
The job I have is simply to get the small program listed below up and running and then deliver to me a working .BAS file.
The code is listed below along with test data that can be used to ensure the program is running correctly.
I have a number of other similar jobs that can be awarded to the right candidate upon successful completion of this one.
Cheers - Andy
*******TEST DATA***********
"How many principal attributes"
>5
"Give principal attributes alphabetically"
>APPEARANCE
>COST
>PERFORMANCE
>RELIABILITY
>SAFETY
"Give primary decisions"
>55
>70
>80
>65
*********Results from software should read*************
>Model Solution
>.33 APPEARANCE
>.27 COST
>.18 SAFETY
>.14 PERFORMANCE
>.08 RELIABILITY
**********BASIC coded Program listing starts here**************
5 PRINT CLS
100 PRINT"COMPUTER AIDED DECISION MAKING
110 PRINT"------------------------------
120 PRINT:PRINT
130 PRINT"PHASE 1 SETTING UP THE MODEL
140 PRINT"------------------------------
150 PRINT
160 INPUT"HOW MANY PRINCIPAL ATTRIBUTES ";N
170 PRINT
180 PRINT"GIVE PRINCIPAL ATTRIBUTES ALPHABETICALLY
190 PRINT
200 DIMA$(N)
210 FORJ=1TON:INPUTA$(J):NEXTJ
220 PRINT
230 PRINT"GIVE PRIMARY DECISIONS
240 PRINT
250 DIMM(N,N-1)
260 FORJ=1TON-1
270 INPUTM(1,J)
280 NEXTJ
290 PRINT
300 DIMR(N)
310 LETR(1)=1
320 FORJ=1TON-1
330 K=J+1
340 LETM(J+1,J)=100-M(1,J)
350 LETR(K)=M(J+1,J)/M(1,J)
360 NEXTJ
370 FORJ=1TON
380 LETB=B+R(J)
390 NEXTJ
400 DIMF(N)
410 FORJ=1TON
420 LETF(J)=INT((R(J)/B)*100+.5)/100
430 NEXTJ
440 PRINT
450 PRINT
460 PRINT"MODEL SOLUTION
470 PRINT"______________
480 PRINT
490 FORI=1TON-1
500 FORJ=1TON-1
510 IFF(J)=F(J+1)THEN580
520 LETT=F(J)
530 LETV$=A$(J)
540 LETF(J)=F(J+1)
550 LETA$(J)=A$(J+1)
560 LETF(J+1)=T
570 LETA$(J+1)=V$
580 NEXTJ,I
590 FORI=1TON
600 PRINTF(I),A$(I)
610 NEXTI
620 END
Andy R.
100% (7)Projects Completed
9
Freelancers worked with
8
Projects awarded
50%
Last project
4 May 2020
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies