Write a function procedure to input three different strings and find the longest string.
1 Answer
DECLARE FUNCTION LON$ (A$, B$, C$)
CLS
INPUT "ENTER THREE STRINGS:"; A$, B$, C$
PRINT "THE LONGEST STRING=";LON$ (A$, B$, C$)
END
FUNCTION LON$ (A$, B$, C$)
A = LEN (A$)
B = LEN (B$)
C = LEN (C$)
IF A > B AND A > C THEN S$ = A$
IF B > A AND B > C THEN S$ = B$
IF C > A AND C > B THEN S$ = C$
LON$ = S$
END FUNCTION
-
Who is a system analyst? What are the characteristics of system analysts? 1
-
What are the different stages of the system development life cycle (SDLC) 1
-
What do you understand about AI? What are the negative and positive aspects of AI in society? 1
-
How does an AI application work? Can a computer really think with the aid of AI? 1