Homework Problems on using if, if-elseif-else, ternary, and switch conditionals.Also, problems on using comparison and logical operators.
- Write a program to check whether the user input alphabet is a vowel or consonant.
- Write a program to check if the user input integer is positive or negative.
- Write a program to check whether the user inputnumber is the multiple of 3, 5, 7, 8, or 11.
- Write a program that will take user inputs then do a conversion between Miles and Kilometers. You need to Use Switch structure for this problem. (i.e. The user should be prompted to type in a number then the choice of conversion. If the user chose Kilometer to Miles, the number that the user typed in needs to be converted to Miles then the result should be displayed)
Ex) >>Please type in a number
>>Please make a choice 1) Kilometers to Miles 2) Miles to Kilometers
>>Thank you. 100 Miles is 160.934 Kilometers.
- Redo problem 2 with Ternary (Trinary)
- Some of you may have encountered errors or issues with using scanf() function multiple times in a single script. Do a google search and find how to avert those errors. Please, let the instructor know what you have found – no more than 100 words!
Since these problems are rather easy – you do not have to create pseudo code. Just create 5 .c scripts and a word document for problem 6. Then, upload them.
Last Updated on September 24, 2018 by EssayPro