Week 2 Practical 1 Input
Week 2 Practical 1 Input
Practical 1
INPUT
#include <iostream>
using namespace std;
return 0;
}
OUTPUT
PART B
QUESTION 1
INPUT
#include <iostream>
using namespace std;
return 0;
}
OUTPUT
PART D
QUESTION 1
INPUT
#include <iostream>
using namespace std;
return 0;
}
OUTPUT
PART D
QUESTION 2
INPUT
#include <iostream>
using namespace std;
product = a*b;
cout << "The product of ";
cout << a<<"and"<<b << "is " << product << endl;
return 0;
}
OUTPUT
OR
INPUT
#include <iostream>
using namespace std;
product =a*b;
cout << "The product of ";
cout << a<<"and"<<b << "is " << product << endl;
return 0;
}
OUTPUT
PART D
QUESTION 3
INPUT
#include <iostream>
using namespace std;
area = width*length;
cout << "The area is" << area << endl;
OUTPUT