Computer Science, asked by gouripaul25, 1 day ago

please help I can't do it ​

Attachments:

Answers

Answered by simonsaikia9
0

Q1)Answer:

#include <iostream>

using namespace std;

int main()

{

   int a, b, temp;

   cout << "Enter the first number, a: ";

   cin >> a;

   cout << "Enter the second number, b: ";

   cin >> b;

   cout << "Before \na: " << a << "\nb: " << b << endl;

   //Swapping using third variable 'temp'

   temp = b;

   b = a;

   a = temp;

   cout << "AFTER \na number: " << a << "\na number: " << b;

}

Q2) Answer:

#include <iostream>

using namespace std;

int main()

{

   double length, breadth, height, volume, tot_surface;

   cout << "Enter length: ";

   cin >> length;

   cout << "Enter breadth: ";

   cin >> breadth;

   cout << "Enter height: ";

   cin >> height;

   volume = length * breadth * height;

   tot_surface = 2 * (length * breadth + breadth * height + height * length);

   cout << "Volume : " << volume << endl;

   cout << "Total Surface Area : " << tot_surface << endl;

}

Answered by anshul240981
1

Answer:

you can answer on my any questions to tack point

Similar questions