Question

C Programming: The program consists of three functions. The first function is for taking the input....

C Programming:

The program consists of three functions.

The first function is for taking the input. once the user enters '00001111' the input begins and once the user enter the same number 00001111 the input stops.

Second funtion is for saving the input data.

Third function is for displaying the data.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

int sum(int x, int y)
{
        int ans = 0;    //holds the answer that will be returned
        ans = x + y;    //calculate the sum
        return ans              //return the answer
}
Add a comment
Know the answer?
Add Answer to:
C Programming: The program consists of three functions. The first function is for taking the input....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Kindly solve this using C PROGRAMMING ONLY. 4. Write a program marks.c which consists of a...

    Kindly solve this using C PROGRAMMING ONLY. 4. Write a program marks.c which consists of a main function and three other functions called. readmarks , changemarks (, and writemarks() The program begins by calling the function readmarks () to read the input file marksin. txt which consists of a series of lines containing a student ID number (an integer) and a numeric mark (a float). Once the ID numbers and marks have been read into arrays (by readmarks () the...

  • In this program, you will be using C++ programming constructs, such as overloaded functions. Write a...

    In this program, you will be using C++ programming constructs, such as overloaded functions. Write a program that requests 3 integers from the user and displays the largest one entered. Your program will then request 3 characters from the user and display the largest character entered. If the user enters a non-alphabetic character, your program will display an error message. You must fill in the body of main() to prompt the user for input, and call the overloaded function showBiggest()...

  • 1. The first small program realizes the following functions: (1) The program allows input of ID...

    1. The first small program realizes the following functions: (1) The program allows input of ID (3-digit integer representation), month (1-12), revenue and record these information in file1 (2) If the ID entered by the user and the income of the corresponding month already exist in file1, remind: the income information has been entered, please do not repeat the entry 2. The second small program realizes the following functions: (1) Calculate the tax payable for each ID in file1 in...

  • Is Prime Number In this program, you will be using C++ programming constructs, such as functions....

    Is Prime Number In this program, you will be using C++ programming constructs, such as functions. main.cpp Write a program that asks the user to enter a positive integer, and outputs a message indicating whether the integer is a prime number. If the user enters a negative integer, output an error message. isPrime Create a function called isPrime that contains one integer parameter, and returns a boolean result. If the integer input is a prime number, then this function returns...

  • USING C++ PROGRAM Instructions - Part C Write a program that has three functions: All characters...

    USING C++ PROGRAM Instructions - Part C Write a program that has three functions: All characters printed should be in White ► Call the first function from main().Print "I'm in main" (as shown in example) > Print "I'm in function 1" in the first function. Call the second function. ► Print "I'm in function 2” in the second function and then ask the user to enter a float value. Enter 25 Call a third function and pass the value to...

  • In this program, you will be using C++ programming constructs, such as functions. main.cpp Write a...

    In this program, you will be using C++ programming constructs, such as functions. main.cpp Write a program that asks the user to enter an integer value. Your program will then display that integer back to the user. Your program should include a function called getInteger that requests an integer value from the user and returns that value back to the caller. Your main () function will call the function getInteger and will then display the value returned by that function....

  • Using C++ programming. Write a program that takes a string of input from the user and...

    Using C++ programming. Write a program that takes a string of input from the user and separates the string of words based on the premise that the string contains words whose first letter is uppercase. Then, display the phrase (or sentence) to a string in which the words are separated by spaces and only the first word of the phrase starts with an uppercase letter. For example, if the user enters "IAmTheTeacher", then the program would display: "I am the...

  • In a file called First SecondNext.java, write a program that: • Asks the user to enter...

    In a file called First SecondNext.java, write a program that: • Asks the user to enter a string that contains at least five letters. It is OK if your program crashes when the user enters a string with length less than 5. • Stores that string in a variable called s. • Creates a variable called "first", and sets it equal to the first letter of s. • Creates a variable called "second", and sets it equal to the second...

  • Create a program in C++ that has only an integer type input called in. This program...

    Create a program in C++ that has only an integer type input called in. This program interchanges two characters’ positions based on user’s input value. The specifications are: If user enters 0, first and second characters are swapped. If user enters 1, first and last characters are swapped. If users enter 2, second and last characters are swapped. For example: The original text is “ABC”. First letter is A, second letter is B and last letter is C. If 0...

  • Problem H1 (Using C++) In the main function, define four variables of type int, named: first,...

    Problem H1 (Using C++) In the main function, define four variables of type int, named: first, second, third, and total. Write a function named getData that asks the user to input three integers and stores them in the variables first, second, and third which are in the main function. Write a function named computeTotal that computes and returns the total of three integers. Write a function named printAll that prints all the values in the format shown in the following...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT