Question
This is a program I am currently working on: Purpose of this program: a) functions b) if, else if, else c) for loops d) printf
This is a program I am currently working on: Purpose of this program: a) functions b) if, else if, else c) for loops d) printf e) primitive types f) single dimension arrays g) String class, char x[], with several functions h) ASCII Values 1) In the main function a) Create the following variables: int i = 7; int j = 9; double x = 72.5; double y = -0.34; b) Passing the previous variables, call the following functions: processAbsoluteValues processRoundValues processCeilingValues processFlooringValues processMinimunValues processMaximunValues processTrigFunctionsValues (cos, sin, tan) processExponentialValues processLogValues processPowerValues processSquareRootsValues processRandomValues c) Create a single dimension array containing ONE index, which will have ONE string with your full name as follows: "first name $ middle name % last name and ONE space" Example: "George & Washington % Rodriguez " Note: if you do not have a middle name use MN as your middle name. 2) Create the previous functions, and in their corresponding functions, using the data received, implement the following Math functions: abs, round, ceil, floor, min, max, cos, sin, tan, exp, log, pow, sqr, random 3) Create a function called myName. Using the for loop, if, else if, else, ||, &&, printf a) Examine each character of your name and determine if it is: a space, a vowel (a,e,i,o,u,A,E,I,O,U), a consonant (b,w,g, etc), the symbol % or the symbol $, and using the current value of x in your for loop print: character [x] located at position x is a consonant or character [x] located at position x is a vowel or character [x] located at position x is a space or character [x] located at position x is a symbol example: My name is [George $ Washington % Rodriguez] character [G] located at position 0 is a consonant character [e] located at position 1 is a vowel character [o] located at position 2 is a vowel character [r] located at position 3 is a consonant character [g] located at position 4 is a consonant character [e] located at position 5 is a vowel character [ ] located at position 6 is a space character [$] located at position 7 is a symbol character [ ] located at position 8 is a space character [W] located at position 9 is a consonant character [a] located at position 10 is a vowel character [s] located at position 11 is a consonant character [h] located at position 12 is a consonant character [i] located at position 13 is a vowel character [n] located at position 14 is a consonant character [g] located at position 15 is a consonant character [t] located at position 16 is a consonant character [o] located at position 17 is a vowel character [n] located at position 18 is a consonant character [ ] located at position 19 is a space character [%] located at position 20 is a symbol character [ ] located at position 21 is a space character [R] located at position 22 is a consonant character [o] located at position 23 is a vowel character [d] located at position 24 is a consonant character [r] located at position 25 is a consonant character [i] located at position 26 is a vowel character [g] located at position 27 is a consonant character [u] located at position 28 is a vowel character [e] located at position 29 is a vowel character [z] located at position 30 is a consonant character [ ] located at position 31 is a space 4) Create a function called pyramid. Using a for loop, display to the screen, the string containing your name so that each loop will NOT contain the first and the last character from the previous line, with the length of the string being printed, and the string surrounded by square brackes [] NOTE: Every function dealing with your name, MUST be called from main, PASSING your name to it. Example: 32 [George $ Washington % Rodriguez ] 30 [eorge $ Washington % Rodriguez] 28 [orge $ Washington % Rodrigue] 26 [rge $ Washington % Rodrigu] 24 [ge $ Washington % Rodrig] 22 [e $ Washington % Rodri] 20 [ $ Washington % Rodr] 18 [$ Washington % Rod] 16 [ Washington % Ro] 14 [Washington % R] 12 [ashington % ] 10 [shington %] 8 [hington ] 6 [ington] 4 [ngto] 2 [gt] 0 [] 5) In a function called parsing do the following: NOTE: Every function dealing with your name, MUST be called from main, PASSING your name to it. a) Print your name in upper case letters. b) Print your name in lower case letters. c) Print your name taking all spaces out. d) Print your name with all vowels in upper case, and all consonants in lower case. e) Print your name backwards. f) Print your name in ASCII values.
I was given an answer earlier, which is posted below:
#include
#include
#include
#include
#include
void processAbsoluteValues(int i, int j, double x, double y) {
printf("Absolute value of i: %d ", abs(i));
printf("Absolute value of j: %d ", abs(j));
printf("Absolute value of x: %f ", fabs(x));
printf("Absolute value of y: %f ", fabs(y));
}
void processRoundValues(int i, int j, double x, double y) {
printf("Round value of i: %d ", round(x));
printf("Round value of j: %d ", round(y));
printf("Round value of x: %f ", round(x));
printf("Round value of y: %f ", round(y));
}
void processCeilingValues(int i, int j, double x, double y) {
printf("Ceiling value of i: %d ", ceil(x));
printf("Ceiling value of j: %d ", ceil(y));
printf("Ceiling value of x: %f ", ceil(x));
printf("Ceiling value of y: %f ", ceil(y));
}
void processFlooringValues(int i, int j, double x, double y) {
printf("Flooring value of i: %d ", floor(x));
printf("Flooring value of j: %d ", floor(y));
printf("Flooring value of x: %f ", floor(x));
printf("Flooring value of y: %f ", floor(y));
}
void processMinimunValues(int i, int j, double x, double y) {
printf("Minimum value of i and j: %d ", fmin(i, j));
printf("Minimum value of x and y: %f ", fmin(x, y));
}
void processMaximunValues(int i, int j, double x, double y) {
printf("Maximum value of i and j: %d ", fmax(i, j));
printf("Maximum value of x and y: %f ", fmax(x, y));
}
void processTrigFunctionsValues(int i, int j, double x, double y) {
printf("Cosine of x: %f ", cos(x));
printf("Cosine of y: %f ", cos(y));
printf("Sine of x: %f ", sin(x));
printf("Sine of y: %f ", sin(y));
printf("Tangent of x: %f ", tan(x));
printf("Tangent of y: %f ", tan(y));
}
void processExponentialValues(int i, int j, double x, double y) {
printf("Exponential of x: %f ", exp(x));
printf("Exponential of y: %f ", exp(y));
}
void processLogValues(int i, int j, double x, double y) {
printf("Natural logarithm of x: %f ", log(x));
printf("Natural logarithm of y: %f ", log(y));
}
void processPowerValues(int i, int j, double x, double y) {
printf("i raised to the power of j: %f ", pow(i, j));
printf("x raised to the power of y: %f ", pow(x, y));
}
void processSquareRootsValues(int i, int j, double x, double
However, I am getting error codes when running the program:
Is there a solution to this problem? Thank you.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started