1. Accept the numbers until the user enters the value “-1”. When user enters “-1”, the program prints mean, mode and median values of the given numbers. (Hint: You can use an array structure for keeping the numbers.) You must calculate these values with using your functions like “find_mean”, “find_mode” and “find_median”.
The mean value is found by dividing the sum of the numbers by the count of the numbers.
The median value is the middle value of the given numbers. If the given numbers’ count is even, the program should calculate the average of two middle values.
The mode value is the count of the the most entered number. (i.e. is the number that is repeated more often than any other).
2. Get the 3 words from user. The program has to decide that these words are palindrome or not. You can use array structure for keeping words but you must use a recursive function to do this operation. Assume that all words are lowercase and their sizes are not bigger than 25. The palindrome is a word, a phrase, or a sequence that reads the same backwards as forwards, e.g. “madam” or “nursesrun”. (Assume that every time user enters three words.)
Example: Enter the three words to check if it is a palindrome palindrome aibohphobia reviver palindrome is not a palindrome aibohphobia is a palindrome reviver is a palindrome
3. Get a number from the user and determine that the number is prime or not. After that, your program that should convert this decimal number (which is given by the user as input) to its binary format. Print the results on the screen.
Project olduğu doğrudur...
DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.
Üye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.
program prints mean, mode and median values of the given numbers. (Hint: You can
use an array structure for keeping the numbers.) You must calculate these values with
using your functions like “find_mean”, “find_mode” and “find_median”.
The mean value is found by dividing the sum of the numbers by the count of
the numbers.
The median value is the middle value of the given numbers. If the given
numbers’ count is even, the program should calculate the average of two
middle values.
The mode value is the count of the the most entered number. (i.e. is the number
that is repeated more often than any other).
Example:
5, 14, -8, 1, 30, 14, -5, -10, -5, -5, -1
mean= 3,10
median= 22,00
mode= -5
2. Get the 3 words from user. The program has to decide that these words are palindrome
or not. You can use array structure for keeping words but you must use a recursive
function to do this operation. Assume that all words are lowercase and their sizes are
not bigger than 25. The palindrome is a word, a phrase, or a sequence that reads the
same backwards as forwards, e.g. “madam” or “nursesrun”. (Assume that every time
user enters three words.)
Example:
Enter the three words to check if it is a palindrome
palindrome
aibohphobia
reviver
palindrome is not a palindrome
aibohphobia is a palindrome
reviver is a palindrome
3. Get a number from the user and determine that the number is prime or not. After that,
your program that should convert this decimal number (which is given by the user as
input) to its binary format. Print the results on the screen.
Project olduğu doğrudur...
DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.
Üye Ol Şimdi DeğilÜye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.