Pascal/Turbo Pascal - Calculadora Cientifica en Pascal

 
Vista:
sin imagen de perfil

Calculadora Cientifica en Pascal

Publicado por Daniel (1 intervención) el 03/06/2020 15:28:11
calculadora científica completa sean libres de modificara a su antojo


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
program cal;
uses crt;
  var selec,oper,x,c:integer;
  var n,m,suma,resta,multi,divi,porcent,lon,lom,poten,raiz:double;
  var seno,coseno,tangente,cotan,secan,cosecan:double;
 
begin
    clrscr;
    writeln('digite la cantidad de calculos a realizar');
    read(c);
    for x:=1 to c do
         begin;
                 writeln;
                      writeln('+++++++++++++++++++++++++++++');
                      writeln('+  1------------SUMA------- +');
                      writeln('+  2-----------RESTA------- +');
                      writeln('+  3--------MULTIPLICACION- +');
                      writeln('+  4----------DIVISION----- +');
                      writeln('+  5-------TRIGONOMETRICAS- +');
                      writeln('+  6---------PORCENTAJE---- +');
                      writeln('+  7---------LOGARITMOS---- +');
                      writeln('+  8-------EXPONENCIALES--- +');
                      writeln('+++++++++++++++++++++++++++++');
                      writeln;
                      writeln;
                      writeln('OPERACION:');
                      read(selec);
 
                      case selec of
 
                      1: begin;
                            write ('SUMAR:  ');
                            read(n);
                            write ('MAS:   ');
                            read(m);
                            suma:=n+m;
                            write('EL RESULTADO ES: ',suma:9:2);
                         end;
 
                      2: begin;
                            write ('RESTAR:   ');
                            read(n);
                            write ('MENOS:   ');
                            read(m);
                            resta:=n-m;
                            write('EL RESULTADO ES: ',resta:9:2);
                            read;
                         end;
                      3: begin;
                            write ('MULTIPLICAR:  ');
                            read(n);
                            write ('POR:  ');
                            read(m);
                            multi:=n*m;
                            write('EL RESULTADO ES: ', multi:9:2);
                            read;
                         end;
                      4: begin;
                            write ('DIVIDIR:  ');
                            read(n);
                            write ('ENTRE:  ');
                            read(m);
                            divi:=n/m;
                            write('EL RESULTADO ES; ',DIVI:9:2);
                            read;
                         end;
                      5: begin;
                        writeln;
                      writeln('+++++++++++++++++++++++++++++');
                      writeln('+  1-----------SENO-------- +');
                      writeln('+  2----------COSENO------- +');
                      writeln('+  3---------TANGENTE------ +');
                      writeln('+  4--------COTANGENTE----- +');
                      writeln('+  5---------SECANTE------- +');
                      writeln('+  6--------COSECANTE------ +');
                      writeln('+++++++++++++++++++++++++++++');
                      writeln;
                      writeln;
                      writeln('OPERACION:');
                      read(oper);
 
                         case oper of
 
                            1:begin;
                                 write ('SENO DE: ');
                                 read(n);
                                 seno:= sin(n);
                                 write('EL RESULTADO ES:  ',seno:9:2);
                              end;
                             2:begin;
                                 write ('COSENO DE: ');
                                 read(n);
                                 coseno:= cos(n);
                                 write('EL RESULTADO ES:  ',coseno:9:2);
                              end;
                             3:begin;
                                 write ('TANGENTE DE: ');
                                 read(n);
                                 tangente:=sin(n)/cos(n);
                                 write('EL RESULTADO ES:  ',tangente:9:2);
                              end;
                             4:begin;
                                 write ('COTANGENTE DE: ');
                                 read(n);
                                 cotan:=cos(n)/sin(n);
                                 write('EL RESULTADO ES:  ',cotan:9:2);
                              end;
                             5:begin;
                                 write ('SECANTE DE: ');
                                 read(n);
                                 secan:=1/cos(n);
                                 write('EL RESULTADO ES:  ',secan:9:2);
                              end;
                             6:begin;
                                 write ('COTANGENTE DE: ');
                                 read(n);
                                 cosecan:=1/sin(n);
                                 write('EL RESULTADO ES:  ',cosecan:9:2);
                              end;
                           end;
                         end;
 
 
                      6: begin;
                            write('CATIDAD TOTAL: ');
                            read(n);
                            write('PORCETANJE DESEADO: ');
                            read(m);
                            porcent:= (n*m)/100;
                            write('EL RESULTADO ES: ',porcent:9:2);
                            read;
                         end;
                      7: begin;
                             writeln;
                      writeln('+++++++++++++++++++++++++++++');
                      writeln('+  1---------NATURAL------- +');
                      writeln('+  2---------DECIMAL------- +');
                      writeln('+++++++++++++++++++++++++++++');
                      writeln;
                      writeln;
                      writeln('OPERACION:');
                      read(oper);
 
                         case oper of
 
                         1: begin;
                               write('LOGARITMO NATURAL DE: ');
                               read(n);
                               lon:= ln(n);
                               write('EL RESULTADO ES:  ', lon:9:2);
                            end;
                         2: begin;
                               write('LOGARITMO DECIMAL DE: ');
                               read(m);
                               lom:= (ln(m)/ln(10));
                               write('EL RESULTADO ES:  ', lom:9:2);
                            end;
                        end;
                      end;
                      8: begin;
                            writeln;
                      writeln('+++++++++++++++++++++++++++++');
                      writeln('+  1---------POTENCIA------ +');
                      writeln('+  2--------RADICACION----- +');
                      writeln('+++++++++++++++++++++++++++++');
                      writeln;
                      writeln;
                      writeln('OPERACION:');
                      read(oper);
 
                         case oper of
 
                         1: begin;
                               write(' BASE: ');
                               read(n);
                               write(' EXPONENTE: ');
                               read(m);
                               poten:= exp(m*ln(n));
                               write('EL RESULTADO ES:  ', poten:9:2);
                            end;
                         2: begin;
                               write('BASE: ');
                               read(n);
                               write(' INDICE: ');
                               read(m);
                               raiz:= exp((1/m)*ln(n));
                               write('EL RESULTADO ES:  ', raiz:9:2);
                            end;
                        end;
                 end;
                 else
                    writeln ('NO ES UNA OPCION VALIDA');
                    read();
                    writeln ('              ++++           ');
                    writeln ('           ++      ++        ');
                    writeln ('         ++          ++      ');
                    writeln ('        +    *    *    +     ');
                    writeln ('        +   ***  ***   +     ');
                    writeln ('        +   ***  ***   +     ');
                    writeln ('        +    *    *    +     ');
                    writeln ('         +     **     +      ');
                    writeln ('          +    **    +       ');
                    writeln ('           +        +        ');
                    writeln ('           +]]]]]]]]+        ');
                    writeln ('           +]]]]]]]]+        ');
                    read();
                    writeln ('FATAL ERROR');
 
 
 
         end;
       end;
         writeln;
         readln;
         readln;
         clrscr;
    end.




ESPERO AYUDAROS :)
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
1
Responder