1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
tigry1 [53]
3 years ago
6

Write a complete C program to run on the MSP432 platform to do the following:

Computers and Technology
1 answer:
Butoxors [25]3 years ago
8 0

Answer:

The C code is given below with appropriate comments

Explanation:

#include <stdio.h>

int main()

{

//array declaration

int arr[3][7], cumulativeSum = 0;

 

//initialize the array

for(int i=0; i<3; i++)

{

for(int j=0; j<7; j++)

{

arr[i][j] = i+j;

}

}

//calculate the cumulative sum

for(int i=0; i<3; i++)

{

for(int j=0; j<7; j++)

{

if((arr[i][j] % 5) != 0)

{

cumulativeSum += arr[i][j];

arr[i][j] = 0;

}

}

}

 

//display the final array

printf("The final array is: \n\n");

for(int i=0; i<3; i++)

{

for(int j=0; j<7; j++)

{

printf("%d ", arr[i][j]);

}

printf("\n");

}

 

//display the cumulative sum

printf("\nCumulative Sum = %d", cumulativeSum);

return 0;

}

You might be interested in
An electronic tool that allows information to be input processed and output? A, operating system B.motherboard C.cpu D.computer
kherson [118]

Answer:

This would be considered a CPU in that case.

Explanation:

A CPU does basic arithmetic, logic, controlling, input AND the output. It would be stated in the program's instructions.

7 0
2 years ago
Which terms represent the two types of client requirements?
Brums [2.3K]

Answer:

Client requirements. ... A statement of need, might then be prepared which is a first attempt to describe the possible requirements of the project. This may or may not result in the development of a new business project, and even if a project is necessary, it may not require a new building.

Explanation:

3 0
3 years ago
The data below represents the yearly earnings (in $1000s of dollars) that high school and college (BS) graduates earn at a small
Taya2010 [7]

Answer:

library(moments)

library(readxl)

Exam1Q1 <- read_excel("Exam1Q1.xlsx")

View(Exam1Q1)

## Warning in system2("/usr/bin/otool", c("-L", shQuote(DSO)), stdout = TRUE):

## running command ''/usr/bin/otool' -L '/Library/Frameworks/R.framework/

## Resources/modules/R_de.so'' had status 1

plot(density(Exam1Q1$Highschool))

gostino.test(Exam1Q1$Highschool)

##  

##  D'Agostino skewness test

##  

## data:  Exam1Q1$Highschool

## skew = -0.24041, z = -0.69269, p-value = 0.4885

## alternative hypothesis: data have a skewness

agostino.test(Exam1Q1$BS)

##  

##  D'Agostino skewness test

##  

## data:  Exam1Q1$BS

## skew = 0.53467, z = 1.49330, p-value = 0.1354

## alternative hypothesis: data have a skewness

anscombe.test(Exam1Q1$Highschool)

##  

##  Anscombe-Glynn kurtosis test

##  

## data:  Exam1Q1$Highschool

## kurt = 2.56950, z = -0.29677, p-value = 0.7666

## alternative hypothesis: kurtosis is not equal to 3

anscombe.test(Exam1Q1$BS)

##  

##  Anscombe-Glynn kurtosis test

##  

## data:  Exam1Q1$BS

## kurt = 3.6449, z = 1.2599, p-value = 0.2077

## alternative hypothesis: kurtosis is not equal to 3

t.test(Exam1Q1$Highschool,Exam1Q1$BS, var.equal = T)

##  

##  Two Sample t-test

##  

## data:  Exam1Q1$Highschool and Exam1Q1$BS

## t = 0.16929, df = 76, p-value = 0.866

## alternative hypothesis: true difference in means is not equal to 0

## 95 percent confidence interval:

##  -1.131669  1.341926

## sample estimates:

## mean of x mean of y  

##  39.51282  39.40769

Explanation:

Summary:

The data set include two dependent variables which states High School annual earnings and BS annual earnings in the same small firm. Firstly, I used density plot function to view the distribution of two sets of variables. Secondly, I tested the skewness and kurtosis.Skewness of High School is -0.24041 which is left tail. Skewness of BS is 0.53476 which is right tail.Kurtosis of High School is 2.5695 which lower than 3 is platykurtic. Kurtosis of BS is 3.6449 which larger than 3 is leptokurtic. Thirdly, the sample population is 39 for each and has unknow standard deviation, so that I’m going to use t-test to perform the comparing analysis. The result shows p-value which equal to 0.866 is larger than significant value(alpha = 0.05). To the concludsion, there is no difference between yearly earnings of High School and of BS at a small firm.

3 0
3 years ago
Write the definition of a function named count that reads all the strings remaining to be read in standard input and returns the
spayn [35]

Answer:

The function written in C++

int str(string word) {

int count = 1;

for(int i =0; i<word.length();i++) {

 if(word[i] == ' ') {

  count++;

 }

}

return count;

}

Explanation:

This line defines the function

int str(string word) {

This line initializes count to 1

int count = 1;

This line iterates through the input string

for(int i =0; i<word.length();i++) {

This line checks for blank space

 if(word[i] == ' ') {

Variable count is incremented to indicate a word count

  count++;

 }

}

return count;

}

<em>See attachment for full program</em>

Download cpp
8 0
3 years ago
Please help me!!!!!!!!!!! I really need help
RUDIKE [14]

The answer is a variable

3 0
2 years ago
Other questions:
  • Websites using www showed up on the internet for the first time in -992
    9·1 answer
  • A(n ________ is a program that is used to create, process, and administer a collection of self-describing integrated records.
    14·1 answer
  • How do graphic designers showcase their work?
    14·2 answers
  • The information stored in the _____ is used by the DBMS for a recovery requirement triggered by a ROLLBACK statement, a program'
    7·1 answer
  • What is the default text-wrapping option when inserting images into a Word document?
    5·2 answers
  • Can someone solve this for me please? It’s part of an escape room.
    13·2 answers
  • Write a program that rolls two dice until the user gets snake eyes. You should use a loop and a half to do this. Each round you
    10·1 answer
  • Cyber vulnerabilities to dod systems may include
    12·1 answer
  • Josh is learning about hackers known for causing damage and altering functions of websites. Which type of hacker is he learning
    10·2 answers
  • Pleaseeeee helpppppppp​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!