Question

In: Computer Science

Write a void function that will display the statement “Emancipation of women in Ghana was led...

Write a void function that will display the statement “Emancipation of women in Ghana was led by Nana Agyeman Rawlings “.

Solutions

Expert Solution

C Program :

// stdio.h is a header file in C language to use printf()  to display on the screen.
#include <stdio.h>

void display() // display is a function to print the required output
{
    printf("Emancipation of women in Ghana was led by Nana Agyeman Rawlings");
}

int main() // Inorder to call the function we need to call it by creating a function called main 
{
   display();
   
   return 0; // returns 0 as our main() function's return type is integer (which expects integer)
}

OUTPUT :


Related Solutions

Using c++, write a program that will display your name as a void function then will...
Using c++, write a program that will display your name as a void function then will perform the following by user-defined functions: a. to compute for the sum of two numbers (n1, n2) using function.
Using linux; how would you construct a void function using strfttime() to display time. Also a...
Using linux; how would you construct a void function using strfttime() to display time. Also a function using user_from_uid and group_from_gid to show the users name or group name. Trying to recreate the ls -l command. Thank you in advance!
Write a function that can be used to blink an LED when called.
Write a function that can be used to blink an LED when called.
Write the code (in a function) that allows the user to display the first “nb” of...
Write the code (in a function) that allows the user to display the first “nb” of elements in the Fibonacci sequence (each value on a separate line in the console). The order of the Fibonacci sequence goes as follows: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144 and on to infinity. Each number is the sum of the previous two (with the 2 starting numbers being 1 and 1). This series of numbers is known as...
C++ Write the C++ code for a void function that prompts the user to enter a...
C++ Write the C++ code for a void function that prompts the user to enter a name, and then stores the user's response in the string variable whose address is passed to the function. Name the function getName.
In c++ language, write a void function GetYear that prompts for and inputs the year the...
In c++ language, write a void function GetYear that prompts for and inputs the year the operator was born (type int) from standard input. The function returns the user’s birth year through the parameter list (use pass by reference) unless the user enters an invalid year, in which case a BadYear exception is thrown. To test for a bad year, think about the range of acceptable years. It must be 4 digits (i.e. 1982) and it cannot be greater than...
Write a function that takes a string, returns void and has the effect of shifting the...
Write a function that takes a string, returns void and has the effect of shifting the vowels of the string to the left. For example, if the input string was “hello class”, then after calling this function the string should contain “holla cless” (note that the first vowel is moved to the location of the last vowel). You can use an auxillary string if you want, but a nicer solution would work “in-place”
Design and write a function which will calculate and display the stock level of a product...
Design and write a function which will calculate and display the stock level of a product at the end of the day. The function will take as input the initial stock level, the amount we bought and the amount we sold. Add lines to main which get 3 values from the user, as shown below, the pass them to the function. Sample output: Enter stock at start of day: 20 Enter amount of new stock received today: 10 Enter amount...
In MIPS assembly language, write a function that will display the max and min value in...
In MIPS assembly language, write a function that will display the max and min value in an array. Then write a function to calculate and display the average of all values in an array. This must be done in MIPS assembly language.
Python: Write a recursive function that accepts an integer argument, n. The function should display n...
Python: Write a recursive function that accepts an integer argument, n. The function should display n lines of asterisks on the screen, with the first line showing 1 asterisk, the second line showing 2 asterisks, up to the nth line which shows n asterisks. Test the function.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT