Lab Assignment 1 - Sequential Control Structure - ANSWER SCHEME
Lab Assignment 1 - Sequential Control Structure - ANSWER SCHEME
ANSWER SCHEME
LAB ASSIGNMENT 1 – SEQUENTIAL CONTROL STRUCTURE
1.1
#include<iostream>
using namespace std;
int main()
{
int hours, minutes, seconds;
return 0;
}
1.2
#include<iostream>
using namespace std;
int main()
{
double pound, kg, gram;
kg = 0.453592 * pound;
gram = 453.59237 * pound;
1.3
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
double num1,num2,sum,difference,average,distance;
1.4
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
double width, height, area, perimeter, diagonal;
1.5
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
double mark1, mark2, mark3, mark4, mark5, average;
}
1.6
#include<iostream>
#include<iomanip>
#include<string>
using namespace std;
int main()
{
string movName;
int noAdult, noChild;
double grossProfit, paidDist, netProfit;