Professional Documents
Culture Documents
When we need find a solution in a interview, to use the pseudocode its much better.
Begin
for (i=1 to n)
write (max);
End;
Begin
for (i=1 to n)
if (num[i] < min)
then min = num[i];
end if
end for
write (min);
End;
Begin
read a, b;
min = a;
if (b < min)
then min = b;
end if
write (min);
End;
tlazri@gmail.com
Begin
read a, b, c;
min = a;
if (b < min)
then min = b;
end if
if (c < min)
then min = c;
end if
write (min);
End;
Begin
read a, b, c;
max = a;
if (b > max)
then max = b;
end if
if (c > max)
then max = c;
end if
write (max);
End;
firstname
lastname
marks1
marks2
Begin
read firstname;
read lastname;
read marks1;
read marks2;
grade = "F";
if (average >= 60)
grade = "C";
end if;
if (average >= 80)
grade = "B";
end if;
if (average >= 90)
grade = "A";
end if;
Begin
i =1;
sum = 0;
while (i<= 4)
{
sum = sum + i;
i = i +1;
}
print sum;
End;
Begin
i = 1;
total = 0;
while (i<= 6)
{
total = total + i;
i = i + 1;
total = total - i;
i = i + 1;
}
print total;
End;