Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How do I export my C++ code on Xcode to Scientific Work Place? Is there a code I

ID: 3727501 • Letter: H

Question

How do I export my C++ code on Xcode to Scientific Work Place? Is there a code I have to add? My code is written down below.

#include<iostream>

#include <fstream>

int gcd(int , int );

using namespace std;

int main()

{

int num1, num2, hcf,prd,lcm;

cout << "Enter two numbers to find GCD using Euclidean algorithm: ";

cin >> num1 >> num2;

hcf = gcd(num1, num2);

if (hcf)

{

prd=num1*num2; // calculating product of 2 numbers

lcm=prd/hcf;

  

cout << " The GCD of " << num1 << " and " << num2 << " is: " << hcf

<< endl;

cout << " The LCM of " << num1 << " and " << num2 << " is: " << lcm

<< endl;

ofstream out_data("filename.txt"); //openning the file

out_data << " The GCD of " << num1 << " and " << num2 << " is: " << hcf; // writing into the file

out_data << " The LCM of " << num1 << " and " << num2 << " is: " << lcm;

}

else

cout << " Invalid input!!! ";

}

int gcd(int u, int v)

{

return (v != 0) ? gcd(v, u % v) : u;

}

Explanation / Answer

You can export the applications from the "Organizer".

Go to Product -> Archive. This helps you to create a binary of your application.

Then go to the Organizer - Archives and click Share or Distribute (whichever is available for you), and then choose the format in which you want to export your application.

In case your Product -> Archive is disabled, change your scheme destination to iOS device.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote