PSEINT Exercises
PSEINT Exercises
0INDEX
0INDEX 1
Solved Exercises 4
PRESENTATION 6
USER GUIDE 9
PART 1. Pseudocode: 10
Instruction block 11
Ends 11
PART 4. Instructions in PSEINT 11
PART 5. Execution in PSEINT 11
Pseudocode 12
Desktop Test 12
Encoding in PSEINT 12
SEQUENTIAL CONTROL STRUCTURE 13
Exercise 1. 13
CONDITIONAL CONTROL STRUCTURE 22
Exercise 10 22
ARRANGEMENTS and MODULES 44
9 SOLVED EXERCISES 60
L Annex I 70
PSEINT Instructions 70
0INDEX 1
Solved Exercises 4
PRESENTATION 6
USER GUIDE 9
PART 1. Pseudocode: 10
Instruction block 11
Ends 11
PART 4. Instructions in PSEINT 11
PART 5. Execution in PSEINT 11
Pseudocode 12
Desktop Test 12
Encoding in PSEINT 12
SEQUENTIAL CONTROL STRUCTURE 13
Exercise 1. 13
CONDITIONAL CONTROL STRUCTURE 22
Exercise 10 22
ARRANGEMENTS and MODULES 44
9 SOLVED EXERCISES 60
L Annex I 70
PSEINT Instructions 70
• ANNEX I. PSEINT Instructions 68
PRESENTATION
The Structured Programming program is currently made up of 5 units of competence, within which the topic of Structured
Programming Methodology is addressed. Within this methodology, the definition of variables, algorithms, pseudocode design, design of
data flow diagrams and desktop tests for programming problems must be carried out. However, one activity that motivates students is
seeing their lines of code working.
There is a tool to assist a student in their first steps in programming. Using a simple and intuitive pseudolanguage in Spanish, very
similar to the pseudocode used in class, this tool allows students to visualize the result of their programming instructions; this problem
set is mainly focused on this point.
This series of exercises presents a series of already designed pseudocodes and aims for the student to perform the desktop test of
each of the problems, then code them in PSEINT and execute them. Pseudocode is the structured statement of the problem in Spanish,
which is a series of instructions more similar to programming languages, and desktop testing refers to checking that the instructions
stated in the pseudocode are correct.
The objective of this problem set is to develop in students the ability to understand the pseudocodes presented, analyze them and verify
them with desktop testing, then code them in PSEINT and corroborate results by executing the code.
This problem set is mainly aimed at students taking the Structured Programming learning unit (Learning Unit of the Bachelor's
Degree in Computer Engineering), however, it can also serve as support for students in other degrees (Civil, Mechanical, Computer,
Electronics and Sustainable Energy Systems Engineering) who take the Basic Programming learning unit.
It is worth mentioning that all theory is omitted because it is only a support tool. The theory is presented in the Structured
Programming textbook1.
To review the theory related to PSEINT, it is recommended to view the following tutorials (although they are not the only ones
that exist):
1. Tutorial on developing Pseudocode algorithms PSEINT #1 - Introduction. Available in
https://www.youtube.com/watch?v=aEMrTa-KIOE
2. How to use PSEINT and make an algorithm 2016. Available at: https://www.youtube.com/watch?v=dwFd4srugJs
3. PSEINT Tutorial Getting Started [The Basics] of Pseudocode. Available at: https://www.youtube.com/watch?v=MVLu5j5tgzA
4. Tutorial develop algorithms Pseudocode PSEINT #3 – While. Available in:
https://www.youtube.com/watch?v=KAZyKvUgRH0.
5. Tutorial on developing Pseudocode algorithms PSEINT #2 - Yes-Then ............................ Available in:
https://www.youtube.com/watch?v=2bETFtyc0Qw
In the last part, some solved exercises are presented, which serve as support to explain how to solve different cases that may
arise in each of the exercises. Due to the nature of the problem, a section on the solution to the problems is not attached. However, the
solved exercises can display a clear description to understand the use of this problem set.
At the end of the problem set, a bibliography is attached so that the student can, if required, consult some material to support him
in the interpretation and definition of variables.
The prior knowledge required for the use of this material is: Control structures, data structures, elementary primitive instructions,
one-dimensional arrays, two-dimensional arrays and modularity.
USER GUIDE
This user guide aims to guide the student in how to solve each of the problems presented in this compendium of problems by
describing the parts that make up each exercise and exemplifying a program.
The table that must be completed by the students is the following (see Figure 1):
PART 2
PART 4
PART 1
PART 3 PART 5
PART 1. Pseudocode:
This section presents a pseudocode program, a series of instructions that solve a problem. The instructions that may appear are (see
table 1):
EndAlgorithm
Perform the corresponding desktop and screen tests, code in C and run the programs so that you can complete the following boxes using
screenshots.
Exercise 1.
Write a program that calculates the perimeter and area of a circle given its radius.
Pseudocode Desktop Test Encoding in PSEINT
A: 4
Q:
ex., "be (" Vwoe-o qe TO:
5 *• be ( D e,.e et ig
1
3
Exercise
2.
Write a program that calculates the area and perimeter of a pentagon.
Pseudocode Desktop Test Encoding in PSEINT
L: 5 a: 4 PM:
TO:
reader,
"C"oace it all")
P.
M- -("Da- Io apolc")
Screen Execution in PSEINT
"! A e2 / A '
Iq
1
4
Exercise
2.
Write a program that performs the sum of two integers
Pseudocode Desktop Test Encoding in PSEINT
n1:45
n2:67
A:
-be (" P -ouv- e- sum E
CM. be C*' PlUM.LT {,ney________1
ter
T.
— Screen Execution in PSEINT
1
5
Exercise
2.
Write a program to calculate the square of 243
Pseudocode Desktop Test Encoding in PSEINT
A:
< g {8 ? 9 T = f- ~ 2 2Lvi 2 }x , { J HH A 2 2
1 or N - -
1
6
Exercise
2.
Write a program that calculates the perimeter and area of a rectangle
Pseudocode Desktop Test Encoding in PSEINT
b:6 h:3 P: A:
1
7
Exercise
2.
Write a program that reads the make and model of a car from the keyboard and prints the model and make on the screen (in the reverse order of
what is read)
g outo~ouilts")
leev MA --e
Beibe ("Dowe the model of ~-0 lecv
Mod
1 ecvbe ("Model: " Mce
" Mov of | \
Tevmiw, 0toi7mA) Screen Execution in PSEINT
1
8
Exercise
2.
Write a program that calculates the hypotenuse of a right triangle.
Pseudocode Desktop Test Encoding in PSEINT
c1: 4 c2: 3 h:
Home
exvbe ("P..cawo caxa cakdlav
the wipotew.s A- aw tiovgol
let tov9slo ")
1
9
Exercise
2.
Write a program that calculates the percentage of an amount.
Pseudocode Desktop Test Encoding in PSEINT
2
0
CONDITIONAL CONTROL STRUCTURE
Exercise 10
2
1
Exercise
2.
Test 2: num: 80
-•—
2
2
Exercise
2.
2nd. Test: n: 48
let. . 5 1"
2
3
Exercise
2.
2
4
Exercise
2.
Write a program that indicates whether the sum of two values is positive, negative, or zero.
Pseudocode Desktop Test Encoding in PSEINT
1st. Proof:
a: 25
b: 78
S:
2nd. Proof:
a: 48
f 3e v,V, ( i ftev Q, b b: -56
S 4—0+ L S:
s, (S>o) eutomtes, ,
t,enke ("sa-" 5 p
Sics <03 mto-' „C- Screen Execution in PSEINT
rbt("fowu- ",5, Ne Viw)
p
eciq
2
5
Exercise
2.
Write a program that indicates whether a number is divisible by two and five (at a time).
Pseudocode Desktop Test Encoding in PSEINT
2
6
Exercise
2.
Write a program that indicates whether a person is overweight (if it is considered that they should weigh the number of centimeters they measure
minus 100 or less). The data must be positive.
2
7
Exercise
2.
Write a program that calculates the change that should be given to a customer
Pseudocode Desktop Test Encoding in PSEINT
1st. Proof:
D:100
I/wo C:28
Co-bi at demnte " M:
2
8
Exercise
2.
Write a program that indicates whether a number is divisible by 14
Pseudocode Desktop Test Encoding in PSEINT
1st. Test: num: 84
2
9
Exercise
2.
Write a program that indicates whether a number is a multiple of 6.
Pseudocode Desktop Test Encoding in PSEINT
1st. Test: n: 25
2nd. Test: n: 48
eg, or ( wp,0n/owa qle de levwo
s J. womeo and "eottelo and J leev
v
S: (wua c -o) ele*
• esvic (n,"t wlteb'') otv ° , esv;be (w,"wo
t--Welol, f:as
3
0
Exercise
2.
Write a program that displays the day of the week given a day number
Pseudocode Desktop Test Encoding in PSEINT
1st. Test: ang: 25
Imito.de cowegou ponve dele-mivov
2nd. Test: ang: 148
290)elohces
Screen Execution in PSEINT
Tev •¡ c,
3
1
Exercise
2.
Write a program that displays the day of the week given a day number
Pseudocode Desktop Test Encoding in PSEINT
1st. Test: x: 25
YO,.
("!•< .u (-dito A Sf i—see e.vue ( "Done • dca") - P{ e A , 2nd. Test: x: 4
_________________________________________\
Nt.o, * ¡
v-1 Tameel
eu-ws tLoo" ' I1
x:3 / \
ew ("Miuv vt5") L\
x- 4 and esvibe ("Neule") Screen Execution in PSEINT
,. s -
AND
ec;b, "Or"e F
L .1 ¿ 4
euowe ("Ncomes")
x-1 , (
$beuhe(obode J
EITHER____________________
escube (" Ewe v) Rvuew of 1
f.aus Xc1
-r- 55
"ITEM
YO
\
3
2
Exercise
2.
Write a program that performs addition, subtraction, multiplication, division and exponentiation of two numbers using a menu
2nd. Proof:
•..w (iRudwe q vtaku ogeu oe o' ewo
o: 4
U¿
1. U, h* - muttipctc 4 0L A.Am*
' 1 a: 98 b:-4
(either)
0- 1 r:
5 (0 -6--)
. t-—.a, p, s,0,o
(v-t0)
exW (*Ge wc,-ebde' iev
And r*^ a-b
P-he Cte ",5)
•.we ('NUlau")
.wLcDouee wuVeinoode - --tpuiot ')
■ -— Oib
eve ("Hdheoli ",v)
d- 4
g-..20rC'Di-ucu) v
neo-- God“)
. 2: TO
co
' +— A/b . ,c bc.be ("ia D--aar", Q, "ekc", be') k- »
0’ 5
t*vt (* Vcteiuccw" ,
cowe (Don Vue 9 Rimi'
lres av
c4— QAb ,
es-vibe ( "a, "elevated qlu", . üoltwei <>5 " And
okay
exc.,k [" ee« in occu ) hw do
-
3
3
Exercise
2.
Write a program that calculates the area of a square, a rectangle and a triangle.
Pseudocode Desktop Test Encoding in PSEINT
1st. Proof:
esqbe ("Rroorwa o coko uveoi de Beus) o: 2
eo,oe (" Me o, -xe.: 4 c+ dodo Afet x: 8
3 T. , to.. " ) and:-5
is-ve ('Owe een") TO:
Ie Oft,
co- cege> 2nd. Proof:
Of 1 o: 3
this (Coakobe') ab::-94
esxbe 1 "Dowe yedhida de 0e LD
TO:
leev X
3
4
Exercise REPETITIVE CONTROL STRUCTURE
2.
Write a program that calculates the largest, smallest, and average of N numbers.
Pseudocode Desktop Test Encoding in PSEINT
N: 10
x: 5,8,6,2,0,4,2,-6,1,
7
p:
g:
m
9--*
3
5
Exercise
2.
Write a program that indicates the number of digits that a quantity has to the left of the decimal point.
Pseudocode Encoding in PSEINT
Desktop Test
or: 275932.89
Ieki0 (ePr-erama o—-note —0iP " w -5 •' —— I ,1 c:
3
6
Exercise
2.
Write a program that adds the series 3,6,9 up to 99 and displays its result.
Pseudocode Desktop Test Encoding in PSEINT
p
- g K 3 P p3 PH í 0
YO:
TO:
A > 9 owg 3 f 3 Htve9
¥°" A i, gV(LP
- § tHH w,§
FEITHERand0
i • —R _
" either8
<7.121 /m
5:..N5'II(
g— $
_1 1 O —
1D g
18
3
7
Exercise
2.
Write a program that prints the odd numbers from 7 to 51
Pseudocode Desktop Test Encoding in PSEINT
YO:
Jycio
eavbt ( 'Pvegvaw (opo;we imPves
devtavs)
147 •
Wientvos(L¿-sL)
Escvibe (1)
kn Less lo/mine
Screen Execution in PSEINT
3
8
Exercise
2.
Write a program that verifies if a data entered by keyboard corresponds to the password 252525
Pseudocode Desktop Test Encoding in PSEINT
1st. Proof:
I Pseudédio.
x: 2525, 252525
Hu 51
3
9
Exercise
2.
Write a program that indicates positives and negatives of a set of 25 data (use control structure for).
Pseudocode Desktop Test Encoding in PSEINT
Perform the test with
escutve vp.q.. qae ts nmevs die co10 10 data.
Posc f« 0o5 and ge-o ho» "
x: 2, -1, -3, -8.-7, 2, 4, -
h-—o
5, 7,8
Vovo > O vosta zs ( < nc ) cusike
"Dome on mgw-) (eec p:
s, c x-0-.te, n:
'n yes
S cx>o)e -pve
v.'dP
Í i egg
EScbe ("Pos:VuosI,
"Napluucg*,) lesmcu . Screen Execution in PSEINT
4
0
Exercise
2.
Write a program that prints on the screen the integers from 1 to 30 with their reciprocals.
Pseudocode Encoding in PSEINT
Desktop Test
o A L, 9DP
° 8•gc ~ 9Rd
8„,% 0-L
< Co I * -D Hs2
eitherg
-F ••Q.
eqtoA $ A
0P 2?4
803'
5 C6 g -
~ {% G
-Sh0
—6
4-
3_ Yo
4
1
Exercise
2.
Write a program that indicates the number of positive and negative numbers in a set of 25 numbers.
$< 5+Xx
Screen Execution in PSEINT
Fiw turkey.__1____|
j pulí k»¡ L the suMu is: ", d)
[ev vi
4
2
Exercise ARRANGEMENTS and MODULES
2.
Write a program that indicates to store 100 data in a one-dimensional array and indicates how many positive elements there are in it.
Pseudocode Desktop Test Encoding in PSEINT
Perform desktop test
0.
with 10 data
exvdt (Ykeonoq die t oc. the peacock of the flock"
eS- N. fl 2, a: {5,8,6,2,0,4,2,-6,1,
"IveDeqe •owawo ~* Ste 3 ke k" ec h 7}
p:
5, n> » ne = We ekco
P... =4+ rubber n evw)
• the bt C * Dune owuc") tery aci >
. 5, (oi)> €-v- ps'
T(wove
4
3
Exercise
2.
Write a program that indicates which is the largest and smallest element in a vector of N positions
Pseudocode Desktop Test Encoding in PSEINT
—3 Perform desktop test
— #tbt-( Follow that 4 .>3 the +tewArwfo with 10 data
N=10
icev A A: {5,8,6,2,0,4,2,-6,1, 7}
Ma:
czfr1 hos+. TO Me:
Receive'0qmeol v.wa, \
YO:
—1 Aw 5 7*
•. 232
1 ____ (AtI < meNamtw.a,
Mt -- 4c1] Screen Execution in PSEINT
11j।
| I Cxvbe ('Mayov . • vo, ' Mecen we N
4
4
Exercise
2.
Write a program that fills a vector with 0 in even positions and 1 in odd positions.
Pseudocode Desktop Test Encoding in PSEINT
l.no . Perform desktop test
esbe [ And,vawa Uena i Gak q. " ev > with 10 data
sostges ove oc lo > iwat, ") to:
I-vo iL Wos cm) {__,__,__, __ ,__,__,__,__,
51 i mod 2 o ewtce eCi|—-o __ }
h* :
5i mod 2
I heard]--
fen
Fo pcva
exvbi ("New Nelov")
fovu (-l Vo stu H coL goo 1 write ~C,
& to either• -________ Screen Execution in PSEINT
back
4
5
Exercise 35
Write a program that searches for a number in a vector of 10 positions and indicates its position.
ro ~ - vust. Ag cind)
I 5, (ves m Ci J e vauiyewe e*- -1-
IVF 2,
Fo Pov
S (romun<>epeninces Screen Execution in PSEINT
e..,be ("M-uu. Ue- vuwae ,(F et") tko .
ex v; te (r Noew ve euo w ktodo •)
, fon >.
hsm)o-
4
6
Exercise
2.
Write a program that saves the sales of 10 cashiers for 180 days and indicates which cashier sold the most, the day with the most sales, and
the total sales.
4
7
Exercise
2.
Write a program that records the blood pressure of 30 people for three days and indicates the day that the person had the highest blood pressure
and the lowest blood pressure.
Funou1
. Ra ; 1 host 3 i M)
Pseudocode
4
8
Exercise
2.
Write a program that captures a 10 X 10 matrix with integers and at the end of each row prints the sum of its elements
Pseudocode Encoding in PSEINT
Desktop Test
Enkoddkye Perform desktop
test with:
• ' ' Nee uro cast d 10x10 at fhal c . (ociq yelqle ■ A: {50,80,66}
"hevbg • awaq, {29,40,47}
yes re1 kesi . 10 cio 1 {22,69,91}}
:
Poss pl w ' • I n J
lexcibe LDawr <3u * J 1 I ¡ 1 .1 |ij s:
. It4u , A Ci]s3 1 1 J 1 1 1 1- j
. End . fa*
o- j - 1 hezl dO ( ut) • 1 ! j | 1
t ■ "5 b HFA)
iv eu'W .
—iimm--Hey
4
9
Exercise
2.
Write a program that captures the production of 2 plants for seven days. Indicate which plant produced the most and on what day.
Pseudocode Encoding in PSEINT
Desktop Test
Perform desktop test
esxke (Rogv a qu dce oce pl4e pvodue .Ga) with:
A: {50,80,66}
{29,40,47}
. fbvo J =1 hosto I2- Cinema )_
Pova- A Vosiq H(iw) 1 1 I 1 II {22,69,91}}
%, ( and 3 Jonlonce» s:
esdvbe (I Uorac pvodeceic del d( - ; “de (o ponN X ")
Leev AC,j2
0—04 AC3
b:
eugder, • asen dildoer, vae lepiofa 1 to:
UMAE ' b = b 4 AQiJ fin $ _ ,1i
Screen Execution in PSEINT
. end Qovq || r. 1
1
5,, 1 PT”
‘ "2 --
Evbe L « pinevebhh tu toyou Podecion".
S,E6) eonte, ~ 1 1 II 1 1 1 a ccobe ( a 4^ way
fi.q
Tévive— - | J ■
1 4
s
5
0
Exercise
2.
Write a program that places data on the main diagonal of a 3 X 3 matrix.
Pseudocode Encoding in PSEINT
Desktop Test
Frw Pov
People i = 1 to 3 Cinema)
€scvi be AVi,1)
1 C Pdio
7[ ev u- MD* Screen Execution in PSEINT
5
1
Exercise
2.
Write a program that indicates the largest and smallest elements in a 10-position array.
Pseudocode Encoding in PSEINT
Desktop Test
5
2
Exercise
2.
Write a program that reads a vector A of elements. You must create two new vectors B and C, such that vector B contains all the odd numbers and
vector C contains all the multiples of 3. At the end you should print all three vectors.
eSale LALK1
End of strike
Paia i=1 Mosto KUiKi eschibe (rrnuinpues de 2') esaie (BLK1
Vin pdr 0
5
3
Exercise
2.
Write a program that searches for a number in a vector, indicating the position in which it appears and the number of times it is repeated.
Pseudocode Desktop Test Encoding in PSEINT
Indoesccuccrpcyamu aue search i nümco in an Perform desktop test
inavox posion N >eces~uc se eMi
41—
Kettle 1'1 HosO 10KIK).
with 10 data
esrioe ("'Dre doVo । • e icet v[) V: {5,8,6,2,0,4,2,-6,1, 7}
eenve l -Foatos aavtuvados'")
x:
Sexeum yours. --
Finmicoias edi0u,
cctibc EIDame ciato HM- D-2 i
z:
ice a
Pass 1-1 Hoso 1o(nc)
if (xN,) cn1onet3
scnk ke anose yonoen la vo-cón". •)
Tin cream , ,,
csooe CSc ievie ««S'
5
4
Exercise
2.
Write a program that reads a vector A of 10 elements that determines and prints which is the largest and in what position it is located and which is
the smallest and in what position it is located.
ts he ( Ve2l0, 1
E.be(N01,1"
14 < {
Has+o qeCi 210)
Esc- 'be (Maqor, ma "Posc6-, i)
5
5
Exercise
2.
Write a program that fills a 10 X 10 matrix with integers, passes the elements to a vector, sorts them, and finally returns them sorted to the matrix.
!<** ií-sp
VCw37 x Ci,3}
1
1 fA little X: {50,80,66} {29,40,47}
1
1 ke3 {22,69,91}}
1
ieplle ,
' WLK}>VEL-)endonee:
Yo 1 ' aK-VLM
¿ 1 I VEkJ=VCL
-Swa •
! NLL-QK V:{__,__,__,__,__,__,__,__,__}
wastotK5 B: {___,___,___}
K*ls}a) p3-,,. {___,___,___}
,' 1 00.3-=VUK
S -2* hobeG210) {___,___,___}}
iai iotaigc, ¡ 32-"
aux:
. v. canecv,,3 ,) _"K—_________________
Screen Execution in PSEINT
5
6
Exercise
2.
Write a modular program that uses a menu to calculate the area of a triangle, rectangle and circle.
Pseudocode Desktop Test Encoding in PSEINT
From the /OT akle>
beginning of ~oBo cucdo
op: 3
10ci() 1 (ft egdulum icdlorgud
r CR
MoBo cork tri()
b:5
"k.-pao A:4
p. cce ()
5
7
Exercise
2.
Write a modular program that simulates an ATM with the options of deposits, withdrawals and viewing balance.
Pseudocode Desktop Test Encoding in PSEINT
R muigel c 7 opt:2 r:
otc,f U 2
*' Poe—--uC) p:
opescs.c)
rac) radius() rad:3
ofe 2...c I
e- p- c )
oe5m.2c )
°fheee)
fa, "Hail."
oe-Z „ .
Ac (, "P-um * 1
. c-.
S.- ....
T.-. 1
5
8
Exercise
2.
9 SOLVED EXERCISES
€5cv i and (Roqvowon that caltola cu:27 Write "program that calculates the square and a bucket of a nuñero"
Write "Give me a number"
Faith 1 Read n
ÉSth bc ( “uavol” ca
t,, t 1 1
Screen Execution in PSEINT
5
9
Exercise 49
6
0
Exercise
2.
Write a program that indicates how many numbers there are to the left of a quantity.
EndAlgorithm
6
1
Exercise
2.
Write a program that indicates whether a number is a multiple of 6.
6
2
Exercise
2.
Write a program that indicates the largest element and its position and the smallest element and its position in a vector of 10 positions.
A: {4,7,9,6}
ge
i:1,2,3,4 m:4,7,9
me:4 h:1,2,3 k:1
and , 2H-
Write "Program that tells which is the largest and smallest element of a vector and in which position it is located*
Xi
Stop ic-1 Up to 10 With Bottom 1 Do Write “Dome data” Read o(l) if i-1 then ma<-a(i) me<-o(i) hi k-í EndIf If a(i)ma Then 1 mo<-o(i) 1 h- EndIf If a(i)eme Then i
meqoCV
M
EndIf End To Write Major. ,ma, Position ",h,“ Minor ,me. Cake,k 1
toAND
EndAlgorithm
2
r
4
Give me information
7
Give me information
••
9
Give me information
6
Major: 9 position 3
1
Minor: 4 position: 1
6
3
Exercise
2.
Write a program that uses a vector of 100 elements and indicates how many of them are positive.
5 n> - w< = W ew.co write "program that tells how many positive elements the user gives" write 'What size do you want your vector to be?' read n
e>VDC I —vov /
fm -i EndAlgorithm
Tavmlivw
6
4
Exercise
2.
Write a program that places satos on the main diagonal of a 3X3 matrix
frw Pov
People i= J hosa 3( ine)
Screen Execution in PSEINT
esevi be ACi,i)
Fce P d. Program that
TevevD places data on
the main diagonal
of a matrix
Give me
information *•* Execution Started. **•
2 Program that places data on the main diagonal of a matrix dome data > 2 dome data > 3
dome data > 4 2 3 4
Give me *•* Execution Completed.
information
3
Give me
information
4
6
5
Exercise
2.
Write a program that uses a 3 X 3 matrix and indicates the sum of the elements per row
1 §88Yo*
, .... - or :gerrI:ITI: $ i ; MMH r Mjl !iiih
Yo: !
Yo
1
Program that writes the sum at the end of each row
Give me data 1.1
1
Give me data 1,2
3
Give me data 1,1 4
4
Give me data 2.1
6
Give me data 2.2
8
Give me data 2.3
7
Give me data 3.1
9
Give me data 3.2
6
Give me data 3.3
5
1 3 4Theaddition of this row
It's 8
6 8 7Theaddition of this row
It's 21
6
6
Literature
1. Albarrán Trujillo SE, Salgado Gallegos M, Structured Programming, UAEM, 2010. ISBN. 978-607-422-127-5.
2. Cairó, Osvaldo, Programming Methodology, Volumes I and II, Computec, Colombia, 2006. ISBN. 978-9701511008.
3. Cairó, Osvaldo. Programming Fundamentals. Think C, Pearson Education, 2006. ISBN. 978-9702608103..
4. Juan Carlos House. Introduction to Programming: Entering the World of Programming (Introduction to Programming
Collection)
programming no. 3). Ed. Creative Andina Corp; 2012. ASIN: B00IP0159C
5. Gorka Urrutia Landa. C Programming Course for Beginners: Learn to Program in C from Scratch. Kindle Edition.
2012, 3rd edition. ASIN: B006J9SXVE
6. Joyanes, Aguilar Luis, Programming in C, McGraw Hill, Mexico, 2010. ISBN-10: 6071512123. ISBN-13: 978-6071512123.
7. Joyanes, Aguilar Luis, Algorithms, Programming and Data Structures, McGraw-Hill Interamericana, February 2006. ISBN 978
8448145149
9. Smith John, Programming Fundamentals Applied to C#: The Essential Manual for Getting Started in the World of
Programming
development of computer applications in C#, ed. CreateSpace. October 2015, ASIN: B0179VR0AA.
10. Zavala Lopez Raul Antonio, Llamas Avalos Roberto. Programming fundamentals for beginners. Kindle Edition, 2013. ASIN:
B00CW4Q94I.
6
7
L Annex I
PSEINT Instructions
Operators:
Operator Meaning Example
Relational
> Greater than 3>2
< Less than 'ABC
= Same as 4=3
<= Less than or equal to 'a'<=b
>= Greater than or equal to 4>=5
Logical
&ÓY Conjunction (and). (7>4) & (2=1)//false
|OO Disjunction (or) (1=1 | 2=1) //true
~ or NOT Denial (no) ~(2<5) //false
Algebraic
+ Addition total <- cantl + cant2
- Subtraction stock <- disp - sale
* Multiplication area <- base * height
porc <-100 * part / whole
/ Division
Operators in PSEINT
6
8
PSEINT Functions
6
9
To review the PSEINT control structure instructions, it is recommended to review:
E https://es.slideshare.net/ronald73k/clase04-tutorial-pseint-5744163
https://es.scribd.com/document/288684623/Pseint-Tutorial
7
0