CSC 4760/5750, Programming Assignment 1

$30.00 $24.00

This assignment consists of 3 parts. Part 1: Summation Program For this part you need to write a sequential program in C/C++ to sum the numbers 1 through n using a loop and prints them to screen. “n” is to be read from the command line, with call from the command line being “./program <n>”…

Rate this product

You’ll get a: zip file solution

 

Categorys:

Description

Rate this product

This assignment consists of 3 parts.

Part 1: Summation Program

For this part you need to write a sequential program in C/C++ to sum the numbers 1 through n using a loop and prints them to screen.

n” is to be read from the command line, with call from the command line being “./program <n>”

Copy, compile and run the program in an interactive shell on the cluster

Take a screen shot of the output.

Part 2: Data manipulation using pointers.

This program should sequentially fill twos arrays named with the numbers 1 to 100.

Each element of the first array should be doubled.

Each element of the second array should be tripled.

Print the array name and contents to the screen.

Swap contents of the arrays. You are not allowed to use a loop for this step.

Print the array name and contents to the screen.

Take a screen shot of the output.

Part 3: OpenMP Hello World

Write a basic program that uses OpenMP to print a basic message from each thread.

The only OMP pragma you are allowed to use is “#pragma omp parallel”

Run the program in an interactive shell on the cluster with at least 2 threads.

Take a screenshot of the output.

Submission

Zip your source code and screenshots together and submit to the dropbox on ilearn.

CSC 4760/5750, Programming Assignment 1
$30.00 $24.00