Prosoft
Basic Programming:
-Algorithms Pseint
-Python
-C++
Variables-Mathematical Operations
Pseint:
Programmation logic.
Programmation of Lenguage .-C++ -Python
1)Data entry.
2)Process.
3)Data output.
Operations to be used:
Sum: + a+b 7+3= 10
Subtration: - a-b 7-3= 4
Multiplication: * a*b 10*2= 20
División: / a/b 12/2= 5
Mod: mod a mod b 10 mod 2= 0
Div: div a div b 10 div 2= 5
15 mod 2= 1 15∟2
15 div 2= 7 1丨7.5
15/2= 7.5
Operator hierarchy:
1. ( )
2. √{[n]1/2 Potency{** ^} From left to right→
3. * / mod div All operations
4. + -
Fractions of Sum :
a) a/b+m/b= a+m/b= n/b
b) a/b+m/n= a*n+b*m/b*n= c/o
Relational Operators:
They are symbols that are used to compare two values, if the result of the comparison is correct, the considered expression is true, otherwise it is false.
5<4 False
5>4 True
5<=5 True
5>=6 False
"Hola"=="hola" False
6!=6 False
Logic operators:
They are used to combine two Boolean values and return a true,false or null result, logical operators are also called Boleans
No
Y
O
V O V V V Y V V
V O F V V Y F F
F O V V F Y V F
F O F F F Y F F
Exercise:
Shoe on the screen a tittle that says mathematical operations, enter 2 integers by keyboard, generate an output with the answer for a sum.
Inicio
⬇
Operaciones Matemáticas
⬇
d1, d2
⬇
Rta←d1+d2
⬇
Rta
Escribir "Operaciones Matemáticas"
Leer d1, d2;
Proceso Rta⬅d1+d2
Type of data:
Numeric-Whole +- 10,-10,5,1,0
Decimal -1.2, 0.5
Texto-Chains
Alphanumerics
Booleanos-True
False
Análysis: Process: Exit:
A real A⬅((B*h)/2) A
B real
h real
Inicio
⬇
B, h
⬇
A⬅((B*h)/2)
⬇
A
Decision cycles:
The user whill decide or choose the requested digits and the indicated process will be executed according to his decision.

Inicio
⬇
Definir n como entero
⬇
"Número entre 1 y 10 "
⬇
n
⬇
⬅ n<5 ➡
⬇ ⬇
"El número es mayor a 5" "El número es menor a 5"
⬇ ⬇
⬇
FinAlgoritmo
Según:
The segun works so that when the user enters number or option they are directed to the select option and executesthe assigned operation.

Repetitive cycles:
Para:It is used to ask from which variable to which variable you want to know.


Comentarios
Publicar un comentario