Question

In: Computer Science

write pseudocode not c program If- else programming exercises 1.    Write a C program to find...

write pseudocode not c program

If- else programming exercises

1.    Write a C program to find maximum between two numbers.

2.    Write a C program to find maximum between three numbers.

3.    Write a C program to check whether a number is negative, positive or zero.

4.    Write a C program to check whether a number is divisible by 5 and 11 or not.

5.    Write a C program to check whether a number is even or odd.

6.    Write a C program to check whether a year is leap year or not.

7.    Write a C program to check whether a character is alphabet or not.

8.    Write a C program to input any alphabet and check whether it is vowel or consonant.

9.    Write a C program to input any character and check whether it is alphabet, digit or special character.

10.    Write a C program to check whether a character is uppercase or lowercase alphabet.

11.    Write a C program to input week number and print week day.

12.    Write a C program to input month number and print number of days in that month.

13.    Write a C program to count total number of notes in given amount.

14.    Write a C program to input angles of a triangle and check whether triangle is valid or not.

15.    Write a C program to input all sides of a triangle and check whether triangle is valid or not.

16.    Write a C program to check whether the triangle is equilateral, isosceles or scalene triangle.

17.    Write a C program to find all roots of a quadratic equation.

18.    Write a C program to calculate profit or loss.

19.    Write a C program to input marks of five subjects Physics, Chemistry, Biology, Mathematics and Computer. Calculate percentage and grade according to following:

Percentage >= 90% : Grade A

Percentage >= 80% : Grade B

Percentage >= 70% : Grade C

Percentage >= 60% : Grade D

Percentage >= 40% : Grade E

Percentage < 40% : Grade F

20.    Write a C program to input basic salary of an employee and calculate its Gross salary according to following:

Basic Salary <= 10000 : HRA = 20%, DA = 80%

Basic Salary <= 20000 : HRA = 25%, DA = 90%

Basic Salary > 20000 : HRA = 30%, DA = 95%

Solutions

Expert Solution

Answer 1
**********
READ n1,n2

IF n1>n2
   WRITE "n1 is Maximum"
ELSE
   WRITE "n2 is Maximum"
ENDIF

Answer 2
**********

READ n1,n2,n3

IF n1>n2 & n1>n3
   WRITE "n1 is Maximum"
ELSEIF n2>n1 & n2>n3
   WRITE "n2 is Maximum"
ELSE
   WRITE "n3 is Maximum"
ENDIF

Answer 3
**********
READ n1

IF n1 > 0
   WRITE "n1 is Positive"
ELSEIF n1 < 0
   WRITE "n1 is Negative"
ELSE
   WRITE "n1 is Zero"
ENDIF

Answer 4
*********

READ n1

IF (n1 % 5 =0) & (n1 % 11 = 0)
   WRITE "n1 is divisible by 5 & 11"
ELSE
   WRITE "n1 is not divisible by 5 & 11"
ENDIF

We are allowed to do only 4 exercise out of any given.

if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and we can edit and change the answers if you argue, thanks :)


Related Solutions

Use c++language Use the pseudocode description below to write a program that uses an if, else...
Use c++language Use the pseudocode description below to write a program that uses an if, else if, else decision structure for a program that will determine if someone lives in Boston. 1. display message that describes what the program will do. 2. ask the user to input an answer to the question: Do you live in Boston?. 3. if they entered 'y', display a message confirming that they live in Boston. 4. if they entered 'n' , display a message...
Write in C programming using if and else statements only please!!! Write a program that plays...
Write in C programming using if and else statements only please!!! Write a program that plays the following card game: The user starts out with a pot of $100. At each hand of the game, the dealer and the player are dealt a random number between 1 and 52. The player wins $20 if his/her number is greater than the dealer's number; otherwise they lose $20.
6. Write a program in C programming (compile and run), a pseudocode, and draw a flowchart...
6. Write a program in C programming (compile and run), a pseudocode, and draw a flowchart for each of the following problems: a) Obtain three numbers from the keyboard, compute their product and display the result. b) Obtain two numbers from the keyboard, and determine and display which (if either) is the smaller of the two numbers. c) Obtain a series of positive numbers from the keyboard, and determine and display their average (with 4 decimal points). Assume that the...
write pseudocode for the following problems not c code Pseudocode only Write a C program to...
write pseudocode for the following problems not c code Pseudocode only Write a C program to print all natural numbers from 1 to n. - using while loop Write a C program to print all natural numbers in reverse (from n to 1). - using while loop Write a C program to print all alphabets from a to z. - using while loop Write a C program to print all even numbers between 1 to 100. - using while loop...
Write the Pseudocode for the following programming problem. Write a program that will calculate a tip...
Write the Pseudocode for the following programming problem. Write a program that will calculate a tip based on the meal price and a 6% tax on a meal price. The user will enter the meal price and the program will calculate tip, tax, and the total. The total is the meal price plus the tip plus the tax. Your program will then display the values of tip, tax, and total. The tip amounts based on the mean price are as...
C Program and pseudocode for this problem. Write a C program that plays the game of...
C Program and pseudocode for this problem. Write a C program that plays the game of "Guess the number" as the following: Your program choose the number to be guessed by selecting an integer at random in the rang of 1 to 1000. The program then asks the use to guess the number. If the player's guess is incorrect, your program should loop until the player finally gets the number right. Your program keeps telling the player "Too High" or...
This is for Java programming. Please use ( else if,) when writing the program) Write a...
This is for Java programming. Please use ( else if,) when writing the program) Write a java program to calculate the circumference for the triangle and the square shapes: The circumference for: Triangle = Side1 + Side2 +Sid3 Square = 4 X Side When the program executes, the user is to be presented with 2 choices. Choice 1 to calculate the circumference for the triangle Choice 2 to calculate the circumference for the square Based on the user's selection the...
Please write variables and program plan(pseudocode) of this C++ programming code: #include <iostream> using namespace std;...
Please write variables and program plan(pseudocode) of this C++ programming code: #include <iostream> using namespace std; void leapYear(int x); int main() { int x; cout << "Enter a year: "; cin >> x; leapYear (x);   return 0; } void leapYear(int x ) {    if (x % 400 == 0)    {    cout << "This is a leap Year";}    else if    ((x % 4 == 0) && (x % 100 != 0))    {    cout <<...
1. Write pseudocode for the following program. You do not have to write actual C++ code....
1. Write pseudocode for the following program. You do not have to write actual C++ code. Assume you have a text file, that has been encrypted by adding 10 to the ASCII value of each character in the message. Design a decryption program that would reverse this process, and display the original message to the console.to the new array. 2.Write the code for the specified program. Use proper style and naming. Test and upload your code as a CPP file....
Please write a C++ program to find the largest number among three numbers using nested if...else...
Please write a C++ program to find the largest number among three numbers using nested if...else statements You need to prompt the user to enter three integer numbers from the keyboard, and then display the largest number among the three. Please create a function to find the largest number among three numbers, and call the maxAmongThree function in the main function.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT