Write a C program that will printout the Complex Numbers in increasing order of their Complex
Argument; the Complex Argument of a Complex Number (a + bi) is the scalar value tan -1
(b/a).
Solution
#include <stdio.h> /* Standard Library of Input and Output */
#include <complex.h> /* Standard Library of Complex Numbers */
void print(complex z1, int n)
{
printf("Printing comples numbers in increasing order: v");
complex n1;
for(int i=0;i<n;i++)
{
n1=z1+i;
printf(" %.2f ", n1);
}
}
int main()
{
double complex z1 = 1.0 + 3.0 * I;
print (z1,5);
return 0;
}
Write a C program that will printout the Complex Numbers in increasing.docx

Write a C program that will printout the Complex Numbers in increasing.docx

  • 1.
    Write a Cprogram that will printout the Complex Numbers in increasing order of their Complex Argument; the Complex Argument of a Complex Number (a + bi) is the scalar value tan -1 (b/a). Solution #include <stdio.h> /* Standard Library of Input and Output */ #include <complex.h> /* Standard Library of Complex Numbers */ void print(complex z1, int n) { printf("Printing comples numbers in increasing order: v"); complex n1; for(int i=0;i<n;i++) { n1=z1+i; printf(" %.2f ", n1); } } int main() { double complex z1 = 1.0 + 3.0 * I; print (z1,5); return 0; }