ECE 175: Computer Programming for Engineering Applications Spring 2016 Lab Assignment #5 Problem 1: Write a C program that generates complex random numbers in [-1,1] (for both the real and imaginary components) using the rand() function and RAND_MAX definition that are in the math.h library. Prompt the user to enter a number of random complex numbers that your program will generate. For each complex that you generate calculate the magnitude. Count the complex numbers that have a magnitude less than 1. Print out the fraction of number numbers generated that magnitude less than 1. Your program should have the following prototypes:
Get Free Quote!
376 Experts Online