
Thanks for the question
Below is the code you will be needing Let me know if you have
any doubts or if you need anything to change.
Thank You !!
Note:
As HOMEWORKLIB strict policy & guidelines, I am only allowed to
answer the first question with the first 4 subparts, please post
the remaining questions as a separate post, and I will be happy to
answer them. Sorry for the inconvenience caused.
============================================================================
// PROBLEM 1
#include<stdio.h>
int main(){
int numbers[10];
int i=0;
printf("Enter 10 elements, please: \n");
for(i=0;i<10;i++){
scanf("%d",&numbers[i]);
}
for(i=0;i<10;i++){
if(numbers[i]%2==0)numbers[i]=1;
else numbers[i]=0;
}
for(i=0;i<10;i++){
printf("%d ",numbers[i]);
}
}
================================================================
// PROBLEM 2
#include<stdio.h>
int main(){
int A[3][3]={{0,1,2},{3,4,5},{6,7,8}};
int B[3][3]={{0,0,0},{0,0,0},{0,0,0}};
int i=0;int j=0;
printf("Enter the values of array B: \n");
for(i=0;i<3;i++){
for(j=0;j<3;j++){
scanf("%d",&B[i][j]);
}
}
int sum=0;
for(i=0;i<3;i++){
sum=A[i][0]+A[i][1]+A[i][2]+B[i][0]+B[i][1]+B[i][2];
printf("The sum of row %d in A and
B = %d\n",i+1,sum);
}
}

================================================================
// PROBLEM 3
#include<stdio.h>
#include<stdlib.h>
int main(){
int size;
printf("Enter the size of array, please: ");
scanf("%d",&size);
int *p_array = (int*)malloc(size*sizeof(int));
printf("Enter the elements of the array, please:
\n");
int i=0;
for(i=0; i<size;i++){
scanf("%d",p_array+i);
}
int search_value;
printf("Enter the element to search: ");
scanf("%d",&search_value);
int matches=0;
for(i=0;i<size;i++){
if(*(p_array+i)==search_value){
if(matches==0){
printf("%d exists in index: %d
",search_value,i);
matches+=1;
}else{
printf("%d ",i);
matches+=1;
}
}
}
if(matches==0){
printf("%d does not
exist",search_value);
}
free (p_array);
}


================================================================
Please help me! For Problem 1, 2 and 3: You are required to submit three .c...
Please solve this question using c++ language
Problem 2. More Probleml. The program builds the array of integers that contains duplicates as well. Your program should find the sum of all unique elements in the array using a function findUniqueSum Arrays Write a program that as before asks the user to enter input as in оn Sample Input/Output Enter a list of numbers ending with -999 3 1 4 55-999 The sum of unique numbers is: 13 Enter a list...
Subset Sum-2 Write an algorithm (in comments) and specify the big O, and a C program to solve the problern below. Read the input for the set elements, the value of K from the user. Assume the size of the set is not bigger than 20. Subset Sum-3 Write an algorithm (in comments) and specify from the user. Assume the size of the set is not bigger than 20 1. Given a finite set of integers, is there a subset...
Write a C Program that finds the row totals and column totals of a Matrix. The user is prompted to enter the numbers to fill in a two-dimensional array of any size (say 3x3). The program then finds the sum of row elements and prints them along-side rows, and finds the sum of columns and prints them along-side corresponding columns. You will need nested for loops please help!
Please help C++ language Instructions Write a program that prompts the user to enter 50 integers and stores them in an array. The program then determines and outputs which numbers in the array are sum of two other array elements. If an array element is the sum of two other array elements, then for this array element, the program should output all such pairs.
Program in C++! Thank you in advance! Write a menu based program implementing the following functions: (1) Write a function that prompts the user for the name of a file to output as a text file that will hold a two dimensional array of the long double data type. Have the user specify the number of rows and the number of columns for the two dimensional array. Have the user enter the values for each row and column element in...
//please help
I can’t figure out how to print and can’t get the random numbers to
print. Please help, I have the prompt attached. Thanks
import java.util.*;
public
class
Test
{
/**
Main method */
public
static
void main(String[]
args)
{
double[][]
matrix
=
getMatrix();
//
Display the sum of each column
for
(int
col
= 0;
col
<
matrix[0].length;
col++)
{
System.out.println(
"Sum
" + col
+
" is
" +
sumColumn(matrix,
col));
}
}
/**
getMatrix initializes an...
FINAL Project 1-) Please submit the solution of your final as Ms-word or PDF document 2-) Complete THREE QUESTIONS out of the four exam questions below. 3-) FOR EACH QUESTION, IT IS REQUIRED to include Ms-Word or Pdf file contains the following A. Source file and sample of your output screen shots. B. Up to one page of your program discussion. In the discussion, state the issues that you may have problem with if there is any. Why your program...
Here is the Prompt for problem 1:
Write a C++ program that reads in a test file. The first number
in the file will be an integer, and will indicate the amount of
decimal numbers to follow. Once you have the read the numbers from
the file into an array then compute the following properties on the
set of numbers: the sum, the average (mean), the variance, the
standard deviation, and the median. Don’t try to do the entire
program...
In C++ please! Please include .cpp and .hpp files! Thank you! Recursive Functions Goals Create and use recursive functions In this lab, we will write a program that uses three recursive functions. Requirements: Important: You must use the array for this lab, no vectors allowed. First Recursive Function Write a function that recursively prints a string in reverse. The function has ONLY one parameter of type string. It prints the reversed character to the screen followed by a newline character....
This is a C program. please help me to write a
pseudocode of the program . also, I want the program In a
do...while loop and the screen output should look like in the
picture. please help me.
3.1. Write a program that asks the user to continue to enter two numbers (at a time). For each pair of numbers entered, the program calculates the product of those two numbers, and then accumulate that product. For each pair of numbers...