|
News
Lab Schedule
QuickBasic Notes
Fortran Notes
Tutor Room
Winplot Manual
Lab Home
xxxxxxxxxxxxxxxxxx
| |
REM This program asks the user to input the coefficients of a linear system
REM of equations, as well as the right hand sides of these equations.
CLS
INPUT "How many linear equations do you have "; M
INPUT "How many unknowns are in the equations "; N
DIM A(1 TO M, 1 TO N), B(1 TO M)
CLS
FOR I = 1 TO M
FOR J = 1 TO N
PRINT "In equation"; I; "what is the coefficient of unknown"; J;
INPUT A(I, J)
NEXT J
NEXT I
PRINT
FOR I = 1 TO M
PRINT "What is the right hand side of equation"; I;
INPUT B(I)
NEXT I
PRINT : PRINT "Here are the coefficients you entered : ": PRINT
FOR I = 1 TO M
FOR J = 1 TO N
PRINT A(I, J);
NEXT J
PRINT
NEXT I
PRINT : PRINT "Here are the right hand sides : "
PRINT :
FOR I = 1 TO M
PRINT B(I);
NEXT I
PRINT : PRINT : PRINT "Bye"
END
|