In this exercise I am using Visual Studio 2019 and a modified version of the std_lib_facilities header found here.
Chapter 24 // Drill 7
Read ten complex<double>s from cin (yes, cin supports >> for complex) and put them into a Matrix. Calculate and output the sum of the ten complex numbers.
Complex does have built in I/O support which is nice. Figuring out how to use cin was annoying though. I eventually discovered it here:
You need to input it as (num,num).
No comments:
Post a Comment