#include<stdio.h>
#include<stdlib.h>
void printMatrix(int **A, int n, int m) {
int i = 0, j = 0;
while(i<n){
j = 0;
while(j<m) {
printf("%d ", A[i][j]);
j++;
}
printf("\n");
i++;
}
printf("\n");
}
int** makeMatrix(int n, int m) {
int i = 0;
int** A = (int**)malloc(sizeof(int*)*n);
while(i<n){
A[i] = (int*)malloc(sizeof(int)*m);
i++;
}
return A;
}
void main() {
int A[10][10];
int B[10][10];
int i = 0,j = 0,n, m;
int** sum;
printf("Enter number of rows: ");
scanf("%d",&n);
printf("Enter number of columns: ");
scanf("%d",&m);
sum = makeMatrix(n,m);
printf("Enter matrix A: \n");
while(i<n){
j = 0;
while(j<m) {
scanf("%d", &A[i][j]);
j++;
}
i++;
}
printf("Enter matrix B: \n");
i = 0;
while(i<n){
j = 0;
while(j<m) {
scanf("%d", &B[i][j]);
j++;
}
i++;
}
i = 0;
while(i<n){
j = 0;
while(j<m) {
sum[i][j] = A[i][j] + B[i][j];
j++;
}
i++;
}
printf("\nA+B:\n");
printMatrix(sum,n, m);
}



Homework 4 Files to submit: mat add.c Time it took Matthew to Complete: 10 mins IN...
Requriements:
Submit only the files requested
Print all floats to 2 decimal points unless stated
otherwise
Descripition :
For this problem you will be implementing a Caesarin Cipher. A
Caesarin Cipher takes a string and a shift amount and shift the
characters in the string by the shift amount.
Specifications:
Only characters should be ciphered
If a character is shifted beyond the end of the aphabet it
should wrap back around
For example if the letter 'y' is shifted 3...
Programming in C/C++ Submit your source code files (all .h and .cpp files) NO GLOBAL VARIABLES Program: Use operator overloaded functions for a birthday club – Based on Chapter 11 lecture (25 pts) Make a class called Birthday that will have a date of month, day, and year and the name. Need to have overloaded operators to compare values along with regular functions like: Overload operator == that takes a Birthdate, compares against the current date values, and returns a...
The files must be called Proper coding conventions required the first letter of the class start with a capital letter and the first letter of each additional word start with a capital letter. Only submit the .java file needed to make the program run. Do not submit the .class file or any other file. 5% Style Components Include properly formatted prologue, comments, indenting, and other style elements as shown in Chapter 2 starting page 64 and Appendix 5 page 881-892....
Files, Pointers and Dynamic Memory Allocation, and Structs Due date/time: Tuesday, Nov 26th, 11:00 PM. WRITE A C++ PROGRAM (USE DYNAMIC MEMORY ALLOCATION) THAT READS N CUSTOMER RECORDS FROM A TEXT FILE (CUSTOMERS.TXT) SUCH THAT THE NUMBER OF THE RECORDS IS STORED ON THE FIRST LINE IN THE FILE. EACH RECORD HAS 4 FIELDS (PIECES OF INFORMATION) AND STORED IN THE FILE AS SHOWN BELOW: Account Number (integer) Customer full name (string) Customer email (string) Account Balance (double) The program...
This interactive program focuses on if/else statements, Scanner, and returning values. Turn in a file named Budgeter.java. To use a Scanner for console input, you must import java.util.*; in your code. This program prompts a person for income and expense amounts, then calculates their net monthly income. Below are two example logs of execution from the program. This program’s behavior is dependent on the user input (user input is bold and underlined below to make it stand out and differentiate...
C Programming QUESTION 9 Write a program that prompts for and reads four integer input values, then a single character command. Submit your program as a .c file named midterm_prog2.c. Note that, similarly to your programming assignments, some percentage of your grade will depend on proper programming style. Your program will calculate and print a new value based on the command that's entered, as follows: 'A' or 'a': Calculate the average of the four input values 'S' or 's': Calculate...
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....
I need help with this code,
I'm stuck on it, please remember step 4, I'm very much stuck on
that part. It says something about putting how many times it
appears
Assignment #1: Sorting with Binary Search Tree Through this programming assignment, the students will learn to do the following: Know how to process command line arguments. 1 Perform basic file I/O. 2. Use structs, pointers, and strings. Use dynamic memory. 3. 4. This assignment asks you to sort the...
In this project you will write a C++ program that simulates the purchase of a single item in an online store. What to do Write a C++ program that: 1. Prints out a welcome message. 2. Prompts the user for the following information: (a) Their first name (example: Roger) (b) Their last name (example: Waters) (c) The name of the product (example: Brick) (d) The unit price of the product (example: 1.99) (e) The quantity to buy (example: 200) (f)...
Lab 10: ArrayLists and Files in a GUI Application For this lab, you will work on a simple GUI application. The starting point for your work consists of four files (TextCollage, DrawTextItem, DrawTextPanel, and SimpleFileChooser) in the code directory. These files are supposed to be in package named "textcollage". Start an Eclipse project, create a package named textcollage in that project, and copy the four files into the package. To run the program, you should run the file TextCollage.java, which...