Problem of the Week #4 1. An integer bis said to be divisible by an integer...
Code in C An integer is divisible by 9 if the sum of its digits is divisibleExample output: by 9. Develop a program which will call UDF: int get input(); to prompt the user for an integer and return this user input to main() Call UDF: Enter an integer: 5463 3 4 5 5463 is divisible by 9 void display int val); to display each digit of the integer starting with the rightmost digit. Your program should also determine whether...
Please paste your code and a screenshot of your output! 1. An integer n is divisible by 9 if the sum of its digits is divisible by 9. Develop a program to determine whether or not the following numbers are divisible by 9: n= 154368 n 621594 n-123456 2. A number is said to be perfect if the sum of its divisors (except for itself) is equal to itself. For example, 6 is a perfect number because the sum of...
Q4 Let z = dkdk-1 d2dı be the base 10 representation of an integer x where di,..., dk are digits drawn from 0,...,9. Explain why x d1 + d2 + . . . + dk (mod 9) = so, also, z di + d2 + . . . + dk (mod 3) = and Thus for example to check whether 57,711 is divisible by 9 or 3 we just add up the digits 5 + 7+7+ 1 + 1 =...
(1 point) Compute the determinant of the matrix -1 -2 -4 -6 -7 -7 7 7 A= 0 0 0 0 -4 -5 7 det(A) (1 point) Find the determinant of the matrix 6 A- 6 -9 -7 det(A) (1 point) Find the determinant of the matrix 2 2 -2 B= 1 -1 2 3 -2 det (B)
Problem 2. Given A- 4 5 6 7 8 9 a. What is the connection between the rank of a matrix and its determinant? b. Find the determinant of A using the second row. What will be the rank of this matrix answer only based on the value of the determinant you found)? c. Find the rank of A by reducing it to Echelon form. Is it the same rank as you found in part b.?
Prove that a(a + 1)(2a + 1) is divisible by 6 for integer a using a quicker proof of this, based on the observation that 6 I m (6 divides m) if and only if 2 I m (2 divides m) and 3 I m (3 divides m). Please use modulo congruences.
6. (10 points) A 2D data x is given below. Find the 3-stage integer wavelet transform (IWT) for x. Use (1,1) integer wavelet transform. (a) Find the matrix xl after column transform in the first stage. 8x8 (b) Find the matrix X2 after row transform in the first stage. 8x8 (c) Find the matrix x3 after column transform in the second stage. 4x4 (d) Find the matrix x4 after row transform in the second stage. 4x4 (e) Find the matrix...
6. Prove that if a and b are odd integers, then a2 is divisible by 8. 7. Prove that if a is an odd integer, then ta + (a + 2)?+ (a +4)2 +1) is divisible by 12.
In C program #include<stdio.h> The first 11 prime integers are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, and 31. A positive integer between 1 and 1000 (inclusive), other than the first 11 prime integers, is prime if it is not divisible by 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, and 31. Write a program that prompts the user to enter a positive integer between 1 and 1000 (inclusive) and that outputs whether the number...
1. Write a C or C++ program A6p2.c[pp] that accepts one command line argument which is an integer n between 2 and 4 inclusive. Generate 60 random integers between 1 and 39 inclusive and store them in a 5 by 12 two dimensional integer array (e.g.,int a[5][12];). Use pthread to create n threads to convert all 60 array elements modulo 11 (i.e. take the remainder after division by 11) in place. You should divide this update task among the n threads as evenly as possible. Print the array both before and after...