Question

In C programming language write a function that takes an integer
n as input and prints the following pattern on the screen:

1 (n times)

2 (n-1 times)

.n (1 time)

For example, if n was 5, the function should print

1 1 1 1 1

2 2 2 2

3 3 3

4 4

5

Answer #1

void numberPattern(int n) { int i, j; for (i = n; i >= 1; --i) { for (j = 0; j < i; ++j) { printf("%d ", n - i + 1); } printf("\n"); } }

In C programming language write a function that takes two arrays
as input m and n as well as their sizes: size_m and size_n,
respectively.
Then it checks for each element in m, whether it exists in n.
The function should update a third array c such that for each
element in m:
the corresponding position/index in c should be either
1, if this element exists in m, or
0, if the element does not exist in n

In R- Studio : Write a function that takes as an input a
positive integer and uses the print() function to print out all the
numbers less than the input integer. (Example: for input 5, the
function should print the numbers 1,2,3,4 { for input 1, the
function should not print a number.) Write a recursive function, do
not use any of the loop commands in your code.

Using C programming
Create a function called printMenu( ) with the following
properties:
Has no function inputs or output.
Prints the following menu to the screen:
1. Enter user name.
2. Enter scores.
3. Display average score.
4. Display summary.
5. Quit
Create a function called printLine( ) with the following
properties:
Takes as input a char
Takes as input an integer corresponding to the number of
times to print the character
Has no function output.
For example, if we...

Programming in C language (not C++)
Write a main function with a function call to a function
called Calculation which has two integer arguments/ parameters. The
function returns a character. Declare and initialize the necessary
data variables and assign balues needed to make it executable and
to prevent loss of information.
//input 2 integer values
//returns the characterequivalent of the higher of the two
integer values
char Calculation(int, int);

***************PLEASE GIVE ANSWERS IN RACKET PROGRAMMING
LANGUAGE ONLY******************
Write a recursive Racket function "update-if" that takes two
functions, f and g, and a list xs as parameters and evaluates to a
list. f will be a function that takes one parameter and evaluates
true or false. g will be a function that takes one parameter and
evaluates to some output. The result of update-if should be a list
of items such that if x is in xs and (f x)...

C programing
Write a function that takes in an integer as input and returns an
integer array of zeros.

in c++
Write a C++ program that asks the user to enter an integer
number and prints it back "vertically" to the screen. Use recursion
in your solution. As an example of how the program will work:
Please enter an integer: 12345
The integer you entered will print vertically as:
1
2
3
4
5

For C++:
a) Write a function is_prime that takes a positive integer X and
returns 1 if X is a prime number, or 1 if X is not a prime
number.
b) write a program that takes a positive integer N and prints
all prime numbers from 2 to N by calling your function is_prime
from part a.

How would I write this function in C programming language?
Function header: int input(int *a, int *b, int
*c)
This function should attempt to input 3 integers from the
keyboard and store them in the memory locations pointed to by a, b,
and c. The input may not be successful in reading all three values.
The function should return the number of values that were
successfully read.

C Programming:
Write a function that takes in an array of integers and an
integer containing the count of elements, then have it returns the
sum of all the even values inside the array.

ADVERTISEMENT

Get Answers For Free

Most questions answered within 1 hours.

ADVERTISEMENT

asked 3 minutes ago

asked 5 minutes ago

asked 22 minutes ago

asked 25 minutes ago

asked 29 minutes ago

asked 36 minutes ago

asked 36 minutes ago

asked 38 minutes ago

asked 42 minutes ago

asked 45 minutes ago

asked 45 minutes ago

asked 48 minutes ago