Professional Documents
Culture Documents
#include <iostream>
using namespace std;
int main() {
// prints sum
cout << first_number << " + " << second_number << " = " << sum;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int a = 5, b = 10, temp;
temp = a;
a = b;
b = temp;
return 0 }
3. Program that Calculates the volume of a sphere.
#include <iostream>
using namespace std;
4. Fahrenheit to Celsius:
#include <iostream>
return 0;
}
5. Program wherein it checks if the input number is Negative, Positive or Zero.
#include <iostream>
int main()
{
int num1;
cout << "Enter the number: ";
cout << " ";
cin>>num1;
if(num1>0){
cout<<num1<<" is a Positive number";
}
else if(num1<0){
cout<<num1<<"is a Negative number";
}
else{
cout<<"You entered Zero";
}
return 0;
}