1- Greatest Common Divisor (GCD),Counting “THE”?

1-Greatest Common Divisor (GCD

Write an algorithm that calculates the GCD of tow positive integer

PRE-CONDITION.

X, Y are positive and I make use of function MOD(X,Y) which returns the remainder of

The integer division of X by Y

GOAL

To find The Greatest Common Divisor (GCD ) Of X and Y If One or both values

Are 0 then the GCD is considered 0

Post-condition

The function return the value of GCD (x,y)

-AND How to write in c language

2- Counting “THE”

Write an algorithm that counts the number of occurrences of the in a character string that ends with the character “.” You may use the procedures open(),read()

,next(),and close().

PRE-CONDITION.

The input character string is accessible by the procedure read(), which returns the

Current character by the procedure next(), which allows you to read the next character and the procedure open() and close() which enable to start and terminate

The reading of

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 1QUIZZ.COM - All rights reserved.