I need help writing this program: Please use horzaontal and vertical spacing Usi
ID: 3624806 • Letter: I
Question
I need help writing this program: Please use horzaontal and vertical spacingUsing the sample program as an example, write a C program that will accept a string value from the keyboard.
Pass this value to a user defined function that will display each character in the string on a separate line of the screen.
Use variable names and a user function name that are meaningful. Be sure and include proper (comments).
#include
/*The function prototype: the function will accept two int values (name do not need to be provided here) and will return an int (the sum). */
int sum(int, int);
void main()
{
int myint1;
int myint2;
int result;
printf("Enter an integer: ");
scanf ("%d", &myint1);
printf("Enter a second integer: ");
scanf("%d", &myint2);
result = sum(myint1, myint2);
printf("The sum is %d. ", result);
return;
}
int sum (int val1, int val2)
{
int thissum;
thissum = val1 + val2;
return thissum;
}