This document was uploaded by user and they confirmed that they have the permission to share
it. If you are author or own the copyright of this book, please report to us by using this DMCA
report form. Report DMCA
Submitted By: Name: Hasnain Ali Roll No: 18134156-022
Section: IT-18-A
Submitted To: Sir. Junaid Muzaffar
1
Q1. #include #include #include<math.h> using namespace std; struct complex { float rel; float img; }s1,s2; int main() 2
{ cout<<"\n\n\t\t\tWelcome to the imaginary system"; float a,b; cout<<"\n\n\t\tEnter real and imaginary part of 1st complex number:"; cin>>s1.rel>>s1.img; cout<<"\n\n\t\tEnter real and imaginary part of 2nd complex number:"; cin>>s2.rel>>s2.img; //Addition a=(s1.rel)+(s2.rel); b=(s1.img)+(s2.img); cout<<"\n\n\t\t Addition: "<<"("<
3