# data[].attributes.body
Question 2 (Muhammad Akmal Bin Jamaludin 25DDT18F2052

# data[].attributes.body
Question 1 (Muhammad AkmaL Bin Jamaludin 25DDT18F2052)

# data[].attributes.attachment_link.readable_text
#include<iostream>
using namespace std;
#define pi 3.142

//function declaration/prototype
void SASphere(float); 
void SACylinder(float,float); 
void SACone(float,float);
int main()
{
	float rSphere, rCylinder, rCone, sCone, hCylinder;
	int option;
		
	cout<<"The list of an option to calculate: "<<endl;
	cout<<"1 = Surface Area of SPHERE"<<endl;
	cout<<"2 = Surface Area of CYLINDER"<<endl;
	cout<<"3 = Surface Area of CONE"<<endl;
	
	cout<<"\nEnter an option ==> ";
	cin>>option;
	
	if(option == 1)
	{
		SASphere(rSphere);
	}
	else if(option == 2)
	{
		SACylinder(rCylinder,hCylinder);	
	}
	else if(option == 3)
	{
		SACone(rCone,sCone);
	}			
	return 0;
}
//function definition for Sphere
void SASphere(float rSphere) 
{
	float result;
	
	cout<<"\nSurface area of SPHERE calculation: "<<endl;
	cout<<"Enter the radius of Sphere: ";
	cin>>rSphere;
	result = 4 * pi * rSphere * rSphere;
	cout<<"The surface area of SPHERE is ==> "<<result;
}
//function definition for Cylinder
void SACylinder(float rCylinder,float hCylinder)
{
	float result;
	
	cout<<"\nSurface area of CYLINDER calculation: "<<endl;
	cout<<"Enter the radius of Cylinder: ";
	cin>>rCylinder;
	cout<<"Enter the height of Cylinder: ";
	cin>>hCylinder;
	result = (2 * pi * rCylinder * rCylinder) + (2 * pi * rCylinder * hCylinder);
	cout<<"The surface area of CYLINDER is ==> "<<result;
}
//function definition for Cone
void SACone(float rCone,float sCone)
{
	float result;
	
	cout<<"\nSurface area of CONE calculation: "<<endl;
	cout<<"Enter the radius of Cone: ";
	cin>>rCone;
	cout<<"Enter the side of Cone: ";
	cin>>sCone;
	result = (pi * rCone * sCone) + (pi * rCone * rCone);
	cout<<"The surface area of CYLINDER is ==> "<<result;	
}

# data[].attributes.body
QUESTION 2 (MUHAMMAD SHAHIRUL ALIFF BIN MOHD RAZALI 25DDT18F2060)

# data[].attributes.body
QUESTION 1 (MUHAMMAD SHAHIRUL ALIFF BIN MOHD RAZALI 25DDT18F2060)

# data[].attributes.attachment_link.readable_text
#include<iostream>
using namespace std;
#define pi 3.142 //to define pi of 3.142

//declare void for function
void SASphere(float);
void SACylinder(float,float);
void SACone(float,float);

int main()
{
	//declaration of geometric shapes
	float rSphere, rCylinder, rCone, sCone, hCylinder;
	int option;
	
	cout<<"The List of an Option to Calculate : "<<endl;
	cout<<"1 = Surface Area of SPHERE"<<endl;
	cout<<"2 = Surface Area of CYLINDER"<<endl;
	cout<<"3 = Surface Area of CONE"<<endl;
	
	cout<<"\nEnter an Option ==> ";
	cin>>option;
	
	//looping for geometric shapes using by number system
	if(option == 1)
	{
		SASphere(rSphere);
	}
	else if(option == 2)
	{
		SACylinder(rCylinder,hCylinder);
	}
	else if(option == 3)
	{
		SACone(rCone,sCone);
	}
	
	return 0;
}

//Calculate the Sphere using formula mathematical geometric shapes
void SASphere(float rSphere)
{
	float Area;
	
	cout<<"\nSurface area of SPHERE calculation :"<<endl;
	cout<<"Enter the radius of Sphere : ";
	cin>>rSphere;
	Area = 4 * pi * (rSphere*rSphere);
	cout<<"The surface area of SPHERE is ==> "<<Area<<endl;
}

//Calculate the Cylinder using formula mathematical geometric shapes
void SACylinder(float rCylinder,float hCylinder)
{
	float Area;
	
	cout<<"\nSurface area of CYLINDER calculation :"<<endl;
	cout<<"Enter the radius of Cylinder : ";
	cin>>rCylinder;
	cout<<"Enter the height of Cylinder : ";
	cin>>hCylinder;
	Area = (2 * pi * (rCylinder*rCylinder))+(2 * pi * rCylinder * hCylinder);
	cout<<"The surface area of CYLINDER is ==> "<<Area<<endl;
}

//Calculate the Cone using formula mathematical geometric shapes
void SACone(float rCone,float sCone)
{
	float Area;
	
	cout<<"\nSurface area of CONE calculation :"<<endl;
	cout<<"Enter the radius of Cone : ";
	cin>>rCone;
	cout<<"Enter the side of Cone : ";
	cin>>sCone;
	Area = (pi * rCone* sCone)+(pi * (rCone*rCone));
	cout<<"The surface area of CONE is ==> "<<Area<<endl;
}

# data[].attributes.body
QUESTION 2 (LEE REN TAU)25DDT18F2057

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;
#define pi 3.142

float SASphere(float);
float SACylinder(float,float);
float SACone(float,float);

int main()
{
	float rSphere,rCylinder,rCone,sCone,hCylinder;
	int option;
	
	cout<< "The list of option to calculate: "<<endl;
	cout<< "1 = Surface Area Of SPHERE"<<endl;
	cout<< "2 = Surface Area Of CYLINDER"<<endl;
	cout<< "3 = Surface Area Of CONE"<<endl;
	
	cout<<"\nEnter An Option ==>";
	cin>>option;
	
	if (option ==1)
	{
		SASphere(rSphere);
	}
	else if (option ==2)
	{
		SACylinder(rCylinder,hCylinder);
	}
	else if (option ==3)
	{
		SACone(rCone,sCone);
	}
	return 0;
}

float SASphere(float rSphere)
{
	float total =0;
	cout<<"\nSurface Area Of SPHERE"<<endl;
	cout<<"Enter The Radius Of Sphere: ";
	cin>>rSphere;
	
	total=4*pi*(rSphere*rSphere);
	
	cout<<"The Surface Area Of SPHERE Is ==> "<<total;
	return total;

}

float SACylinder(float rCylinder,float hCylinder)
{
	float total =0;
	cout<<"\nSurface Area Of CYLINDER "<<endl;
	cout<<"Enter The Radius Of Cylinder: ";
	cin>>rCylinder;
	cout<<"Enter The Height Of Cylinder: ";
	cin>>hCylinder;
	
	total=(2*pi*(rCylinder*rCylinder))+(2*pi*rCylinder*hCylinder);
	
	cout<<"The Surface Area Of CYLINDER Is ==> "<<total;
	return 0;
}

float SACone(float rCone,float sCone)
{
	float total =0;
	cout<<"\nSurface Area Of CONE"<<endl;
	cout<<"Enter The Radius Od Cone: ";
	cin>>rCone;
	cout<<"Enter The Nt Of Cone: ";
	cin>>sCone;
	
	total=(pi*rCone*sCone)+(rCone*sCone)+(pi*(rCone*rCone));
	
	cout<<"The Surface Area Of CONE Is ==> "<<total;
	return total;
}


# data[].attributes.body
QUESTION 1 (LEE REN TAU)25DDT18F2057

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;

int sum(int);

int main()
{
	int n=2;
	
	cout<<"The starting number n is "<< n << endl;
	cout<<"Enter the last number to accumulate (positive even number) : ";
	cin>>n;
	cout<<"sum of series number n + (n+2) + ... + 8 "<<n<<" = "<< sum(n);
	
	return 0;
}

int sum(int n)//Sum(n) = sum(n-2) + n
{
	if (n != 0)
	{
		return n=sum(n-2) + n ;
	}
return 0;
}

# data[].attributes.body
QUESTION 2 (SELANRAJ ANATAN)25DDT18F2047

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;

int sum(int);

int main()
{
	int n=2;
	
	cout<<"The starting number n is "<< n << endl;
	cout<<"Enter the last number to accumulate (positive even number) : ";
	cin>>n;
	cout<<"sum of series number n + (n+2) + ... + 8 "<<n<<" = "<< sum(n);
	
	return 0;
}

int sum(int n)//Sum(n) = sum(n-2) + n
{
	if (n != 0)
	{
		return n=sum(n-2) + n ;
	}
return 0;
}

# data[].attributes.body
QUESTION 1 (SELANRAJ ANATAN)25DDT18F2047

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;
#define pi 3.142

float SASphere(float);
float SACylinder(float,float);
float SACone(float,float);

int main()
{
	float rSphere,rCylinder,rCone,sCone,hCylinder;
	int option;
	
	cout<< "The list of an option to calculate: "<<endl;
	cout<< "1 = Surface Area Of SPHERE"<<endl;
	cout<< "2 = Surface Area Of CYLINDER"<<endl;
	cout<< "3 = Surface Area Of CONE"<<endl;
	
	cout<<"\nEnter an Option ==>";
	cin>>option;
	
	if (option ==1)
	{
		SASphere(rSphere);
	}
	else if (option ==2)
	{
		SACylinder(rCylinder,hCylinder);
	}
	else if (option ==3)
	{
		SACone(rCone,sCone);
	}
	return 0;
}

float SASphere(float rSphere)
{
	float total =0;
	cout<<"\nSurface Area Of SPHERE"<<endl;
	cout<<"Enter The radius Of Sephere: ";
	cin>>rSphere;
	
	total=4*pi*(rSphere*rSphere);
	
	cout<<"The Surface Area Of SPHERE Is ==> "<<total;
	return total;

}

float SACylinder(float rCylinder,float hCylinder)
{
	float total =0;
	cout<<"\nSurface Area Of CYLINDER "<<endl;
	cout<<"Enter The Radius Of Cylinder: ";
	cin>>rCylinder;
	cout<<"Enter The Height Of Cylinder: ";
	cin>>hCylinder;
	
	total=(2*pi*(rCylinder*rCylinder))+(2*pi*rCylinder*hCylinder);
	
	cout<<"The Surface Area Of CYLINDER Is ==> "<<total;
	return 0;
}

float SACone(float rCone,float sCone)
{
	float total =0;
	cout<<"\nSurface Area Of CONE"<<endl;
	cout<<"Enter The Radius Of Cone: ";
	cin>>rCone;
	cout<<"Enter The Nt Of Cone: ";
	cin>>sCone;
	
	total=(pi*rCone*sCone)+(rCone*sCone)+(pi*(rCone*rCone));
	
	cout<<"The Surface Area Of CONE Is ==> "<<total;
	return total;
}

# data[].attributes.body
QUESTION 2 (CHE MUHAMAD AFIQ AIMAN BIN CHE MOHD NORDIN)(25DDT18F2044)

# data[].attributes.body
QUESTION 1(CHE MUHAMAD AFIQ AIMAN BIN CHE MOHD NORDIN)(25DDT18F2044)

# data[].attributes.body
QUESTION 2 (MUHAMMAD HARITH ISKANDAR BIN YUSOF) (25DDT18F2053)

# data[].attributes.body
QUESTION 1 (MUHAMMAD HARITH ISKANDAR BIN YUSOF) (25DDT18F2053)

# data[].attributes.attachment_link.readable_text
#include <cmath>
#include<iostream>
using namespace std;
#define pi 3.142
void SASphere(float);
void SACylinder(float , float);
void SAScone(float , float);
int main()
{
	float rSphere, rCylinder, rCone, hCylinder,sCone;
	int option ;
	
	//User key in input to choose type of Surface Area
	//Display list of option to calculate Geometric Shapes
	cout<< "The list of an option to calculate :"<<endl;
	cout<< "1 = Surface Area of SPHERE"<<endl;
	cout<< "2 = Surface Area of CYLINDER"<<endl;
	cout<< "3 = Surface Area of CONE"<<endl;
	
	cout<< "\nEnter an option ==> ";
	cin>>option;
	

	if(option == 1)
	{
		SASphere(rSphere);
	
	}


	else if (option == 2)
	{
		SACylinder(rCylinder, hCylinder);
		
	}

	else if (option == 3)
	{
	
		SAScone(rCone, sCone);
		
	}
return 0;
}
    void SASphere(float rSphere)
    {
		float Total;
		cout<<"Surface area of SPHERE calculating"; 
		cout<<"\nEnter the radius of SPHere is :"; //User key in Num of radius
		cin>>rSphere;
		Total = 4*pi*rSphere*rSphere; //Formula Process to Get Radius in Sphere
		cout<<"The surface area of SPHERE is ==> "<<Total;
	}
	void SACylinder(float rCylinder, float hCylinder)
	{
		float Total;
		cout<<"Surface area of CYLINDER calculating"; //User key in Num of radius in Cylinder
		cout<<"\nEnter the radius of Cylinder is :"; 
		cin>>rCylinder;
		cout<<"\nEnter the height of Cylinder is :"; //User key in Num of height in Cylinder
		cin>>hCylinder;
		Total = (2*pi*rCylinder*rCylinder) + (2*pi*rCylinder*hCylinder); //Formula Process to Get Radius and height in Cylinder
		cout<<"The surface area of Cylinder is ==>"<<Total;
		
	
	}
	void SAScone(float rCone, float sCone)
	{
		float Total;
		cout<<"Surface area of CONE calculating"; 
		cout<<"\nEnter the radius of Cone is :"; //User key in Num of radius in Cone
		cin>>rCone;
		cout<<"\nEnter the side of Cone is :"; //User key in Num of Side in Cone
		cin>>sCone;
		Total= pi*rCone*sCone+(pi*rCone*rCone); //Formula Process to Get Radius and height in Cone
		cout<<"The surface area of Cone is ==>"<<Total;
		
	}





# data[].attributes.body
QUES 2 (SITI NORAINI BINTI HASSAN 25DDT18F2059)

# data[].attributes.body
QUES 1 (SITI NORAINI BINTI HASSAN 25DDT18F2059)

# data[].attributes.body
QUESTION 2 (Nurshahirah binti Samsuri) (25DDT18F2031)

# data[].attributes.body
QUESTION 1 (Nurshahirah binti Samsuri) (25DDT18F2031)

# data[].attributes.body
QUESTION 2 (NurShuhadah Binti Rosman) (25DDT18F2043)

# data[].attributes.attachment_link.readable_text
#include<iostream>
using namespace std;
int sum(int);

int main()
{
	int n;
	cout<<"Enter the last accumulate(POSITIVE AND EVEN NUMBER) : ";
	cin>>n;
	int total=sum(n);
	cout<<"Sum of series number n + (n+2) + ..... + "<<n<<" = "<<total;
	return 0;
}
int sum(int n)
{
	if(n!=0)
	{
	if(n%2==0)
	return sum(n-2)+n;
	else
	return n;
	}
}

# data[].attributes.body
QUESTION 1 (NurShuhadah Binti Rosman) (25DDT18F2043)

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;
#define pi 3.142 //to define of 3.142

//declare void for function
void SASphere(float);
void SACylinder(float,float);
void SACone(float,float);

int main()
{
	float rSphere, rCylinder, rCone, sCone, hCylinder;
	int option;
	
	cout<<"The list of an option to calculate : "<<endl;
	cout<<"1 = Surface Area of SPHERE"<<endl;
	cout<<"2 = Surface Area of CYLINDER"<<endl;
	cout<<"3 = Surface Area of CONE"<<endl;
	
	cout<<"\nEnter an Option ==> ";
	cin>>option;
	
	if(option == 1)
	{
		SASphere(rSphere);
	}
	else if(option == 2)
	{
		SACylinder(rCylinder,hCylinder);
	}
	else if(option == 3)
	{
		SACone(rCone,sCone);
	}
	
	return 0;
}
void SASphere(float rSphere)
{
	float Area;
	
	cout<<"\nSurface area of SPEHERE calculation :"<<endl;
	cout<<"Enter the radius of sphere :";
	cin>>rSphere;
	Area = 4 * pi *(rSphere*rSphere);
	cout<<"The surface area of SPHERE is ==> "<<Area<<endl;
}

void SACylinder(float rCylinder,float hCylinder)
{
	float Area;
	
	cout<<"\nSurface area of CYLINDER calculation :"<<endl;
	cout<<"Enter the radius of Cylinder : ";
	cin>>rCylinder;
	cout<<"Enter the height of Cylinder :";
	cin>>hCylinder;
	Area = (2 * pi *(rCylinder*rCylinder))+(2 * pi *rCylinder * hCylinder);
	cout<<"The surface area of CYLINDER is ==>"<<Area<<endl;
}

void SACone(float rCone,float sCone)
{
	float Area;
	
	cout<<"\nSurface area of CONE calculation :"<<endl;
	cout<<"Enter the radius of cone : ";
	cin>>rCone;
	cout<<"Enter the side of cone :";
	cin>>sCone;
	Area = (pi * rCone* sCone)+(pi *(rCone*rCone));
	cout<<"The surface area of CONE is ==> "<<Area<<endl;
}

# data[].attributes.body
QUESTION 2 (Nur Athirah Binti Zainal Hamelee) (25DDT18F2049)

# data[].attributes.body
QUESTION 1 (Nur Athirah Binti Zainal Hamelee) (25DDT18F2049)

# data[].attributes.body
QUESTION 2 (Nur Hanani Binti Abd Rahim) (25DDT18F2033)

# data[].attributes.body
QUESTION NO 1 (Nur Hanani Binti Abd Rahim) (25DDT18F2033)

# data[].attributes.body
QUESTION NO 2 (Nur Sabrina Aressa Binti Rozi) 25DDT18F2028

# data[].attributes.body
QUESTION NO 1 (Nur Sabrina Aressa Binti Rozi) 25DDT18F2028

# data[].attributes.body
QUESTION NO 2 (Farah Nurazira Binti Rahim) (25DDT18F2056)

# data[].attributes.body
QUESTION NO 1 (Farah Nurazira Binti Rahim) (25DDT18F2056)

# data[].attributes.attachment_link.readable_text
#include<iostream>
using namespace std;
#define pi 3.142
int SASphere (float);
int SACylinder (float,float);
int SACone (float,float);

int main()
{
	float rSphere, rCylinder, rCone , sCone , hCylinder,total=0,surface;
	int option;
	

	
	cout<<"The list of an option to calculate: "<<endl;
	cout<<"1 = Surface Area of SPHERE"<<endl;
	cout<<"2 = Surface Area of CYLINDER"<<endl;
	cout<<"3 =Surface Area of CONE"<<endl;
	
	cout<<"\nEnter an Option ==> ";
	cin>> option;
	
	if(option == 1)
	{
		total=SASphere(rSphere);
		
	}
	else if (option == 2)
	{
		surface=SACylinder (rCylinder,hCylinder);
	}
	else if (option == 3)
	{
		surface=SACone(rCone,sCone);
	
	}
	return 0;
}

int SASphere (float rSphere)
{	
	float total;
	
	cout<<"Input radius :";
	cin>>rSphere;
	
	total=4*pi*(rSphere*rSphere);
	cout<<"Surface Area of SPHERE :"<<total<<endl;
	
}
int SACylinder (float rCylinder,float hCylinder)
{
	float total;
	
	cout<<"Input radius :";
	cin>>rCylinder;
	cout<<"Input height :";
	cin>>hCylinder;
	
	total=2*pi*(rCylinder*rCylinder)+2*pi*rCylinder*hCylinder;
	cout<<"Surface Area of CYLINDER :"<<total<<endl;
}
int SACone (float rCone, float sCone)
{
	float total;
	
	cout<<"Input radius :";
	cin>>rCone;
	cout<<"Input height :";
	cin>>sCone;
	
	total=pi*rCone*sCone+pi*(rCone*rCone);
	cout<<"Surface Area of CONE :"<<total<<endl;
}

# data[].attributes.body
Soalan 2 (Ahmad Nazran Bin Shawaluddin) 25DDT18F2035

# data[].attributes.body
soalan 1(Ahmad Nazran Bin Shawaluddin)  25DDT18F2035

# data[].attributes.body
Soalan 1(Muhammad Azri Bin Mahmud) 25DDT18F2046

# data[].attributes.body
Soalan 2 (Muhammad Azri Bin Mahmud) 25DDT18F2046

# data[].attributes.body
Contoh: Download .cpp dlm padlet ni

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;

int main()
{ 
	int x;
	
	cout<<"Please enter one integer number = ";
	cin>> x;
	
	if (x%2==0)
	cout<<"Nombor yang anda masukkan adalah no genap";
	
	else
	cout<<"Nombor yang anda masukkan adalah no ganjil";
	
	return 0;
}

# data[].attributes.body
soalan 2 (Nurul Aisyah bt Suzaiman) (25DDT18F2051)

# data[].attributes.attachment_link.readable_text
#include<iostream>
using namespace std;

int sum(int);

int main()
{
	int i = 2;
	
	cout<<"The starting number of n is 2"<<endl;
	cout<<"Enter the last number to accumulate(positive even number):";
	cin>>i;
	cout<<"Sum of sereis number n + (n+2) + ...+"<<i<<"="<<sum(i);
	
	return 0;
}
int sum(int i)
{
	if (i!=0)
	{
		return i=sum(i-2)+i;
	}
return 0;
}

# data[].attributes.body
soalan 1 (Nurul Aisyah bt Suzaiman) (25DDT18F2051)

# data[].attributes.attachment_link.readable_text
#include<iostream>
using namespace std;
#define pi 3.142

float SASphere(float);
float SACylinder(float,float);
float SACone(float,float);

int main()
{
	float rSphere, rCylinder, rCone, sCone, hCylinder;
	int option;
	
	cout<<"The list of an option to calculate:"<<endl;
	cout<<"1 = Surface Area of Sphere"<<endl;
	cout<<"2 = Surface Area of Cylinder"<<endl;
	cout<<"3 = Surface Area of Cone"<<endl;
	
	cout<<"\nEnter an option ==>";
	cin>>option;
	
	if (option ==1)
	{
		SASphere(rSphere);
	}
	else if (option ==2)
	{
		SACylinder(rCylinder,hCylinder);
	}
	else if (option ==3)
	{
		SACone(rCone,sCone);
	}
	return 0;
}
float SASphere (float rSphere)
{	
float total=0;

	cout<<"\nSurface area of sphere:"<<total<<endl;
	cout<<"Enter the radius of sphere:";
	cin>>rSphere;
	
	total= 4*pi*(rSphere*rSphere);
	
	cout<<"The surface area of sphere is ==>"<<total<<endl;
}
float SACylinder(float rCylinder,float hCylinder)
{
	float total=0;
	
	cout<<"\nSurface area of cylinder:";
	cout<<"Enter radius of cylinder:";
	cin>>rCylinder;
	cout<<"Enter height of cylinder:";
	cin>>hCylinder;
	
	total=(2*pi*(rCylinder*rCylinder))+(2*pi*rCylinder*hCylinder);
	
	cout<<"The surface area of CYLINDER is ==>"<<total<<endl;
}
float SACone(float rCone,float sCone)
{
	float total=0;
	
	cout<<"\nSurface area of cone:";
	cout<<"Enter radius of cone:";
	cin>>rCone;
	cout<<"Enter slant of cone:";
	cin>>sCone;
	
	total=(pi*rCone*sCone)+(pi*(rCone*rCone));
	
	cout<<"The surface area of CONE is ==>"<<total<<endl;
}

# data[].attributes.body
Soalan 2 (Nurul Liyana Binti Ramli)
25DDT18F1087

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;
int n=2;
int sum(int n);

int sum(int n){
    if(n!=0){
    return n+sum(n-2);
	return 0;
}
}
int main() 
{
	int total=n+(n+2)+(n+2)+sum(n);
	cout<<"the starting number of n is 2\n";
	cout<<"Enter the last number to accumulate (positive even number) : ";
	cin>>n;
	cout<<"Sum of series Number n+ (n+2) + .... + "<<n<<" = "<<sum(n);
	return 0;
}

# data[].attributes.body
soalan 2 (Nur Afiqah Binti Mohd Hanafiah) (25DDT18F2055)

# data[].attributes.attachment_link.readable_text
#include<iostream>
using namespace std;
int sum(int);

int main()
{
	int m;
	cout<<"Enter the last number to accumulate (positif even number) : ";
	cin>>m;
	int total=sum(m);
	cout<<"sum of series number m + (m+2) + ..... +"<<m<<" = "<<total;

	return 0;
}
int sum(int m)
{
	if(m!=0)
	{
		if(m%2==0)
		return sum(m-2)+m;
		else 
		return m;
		
	}
}

# data[].attributes.body
soalan 1 (Nur Afiqah Binti Mohd Hanafiah) (25DDT18F2055)

# data[].attributes.body
Soalan 1( Nurul Liyana Binti Ramli )
25DDT18F1087

# data[].attributes.attachment_link.readable_text
#include<iostream>
using namespace std;
#define pi 3.142

float SASphere(float);
float SACylinder(float,float);
float SACone(float,float);

int main()
{
	float rSphere,rCylinder,rCone,sCone,hCylinder;
	int option;
	
	cout<<"The list of an option to calculate :"<<endl;
	cout<<"1 = Surface Area of SPHERE"<<endl;
	cout<<"2 = Surface Area of CYCLINDER"<<endl;
	cout<<"3 = Surface Area of CONE"<<endl;
	
	cout<<"\nEnter an option ==> ";
	cin>>option;
	
	if(option == 1)
	{
		SASphere(rSphere);
	}
	else if(option == 2)
	{
		SACylinder(rCylinder,hCylinder);
	}
	else if(option == 3)
	{
		SACone(rCone,sCone);
	}
	return 0;
}
float SASphere(float rSphere){
	
	float total=0;
	cout<<"Surface area of sphera calculation "<<endl;;
	cout<<"Enter the radius of sphere :";
	cin>>rSphere;
	
	total=4*pi*(rSphere*rSphere);
	cout<<"The surface area of SPHERE is :"<<total;
}
float SACylinder(float rCylinder,float hCylinder){
	
	float total=0;
	cout<<"Surface area of cylinder calculation "<<endl;
	cout<<"Enter the radius of cylinder :";
	cin>>rCylinder;
	cout<<"Enter the radius of cylinder :";
	cin>>hCylinder;
	
	total=(2*pi*(rCylinder*rCylinder))-(2*pi*rCylinder*hCylinder);
	cout<<"The surface area of CYLINDER is:"<<total;
}
float SACone(float rCone ,float sCone){
	
	float total=0;
	cout<<"Surface area of cone calculation "<<endl;
	cout<<"Enter the radius of cone :";
	cin>>rCone;
	cout<<"Enter the radius cone :";
	cin>>sCone;
	
	total=(pi*rCone*sCone)+(pi*rCone*rCone);
	cout<<"The surface area of CONE is :"<<total;
	
	return 0;
}


