//Nicholas Jones p149676

//Question 2 calculating volume of sphere.
/*#include <stdio.h>
#include <math.h>
#define PI 3.142

void main()
{
	float volume, userinput, radius, r;

	printf("Please enter the radius of sphere: ");
	scanf("%f", &radius);

	r = pow(radius, 3);
	volume = 1.3 * PI*r;
	printf("\nThe volume of your sphere is: %.4f\n", volume);
}*/


//###################################################################################################

//Question 3 using arrays.

/*#include <stdio.h>

void main()
{
	int i, total = 0;
	int	temp[5];
	float average ;

	for (i = 0; i < 5; i++)
	{
		printf("Please enter temperature %d in degrees centigrade: ", i + 1);
		scanf("%d", &temp[i]);		
	}

	printf("\n");
	for (i = 0; i < 5; i++)
	{
		printf("Temperature %d is: %d degrees C \n", i + 1, temp[i]);
		total = total + temp[i];
	}
	
	average = (float)total / 5;
	printf("\nThe average temperature is: %.2f degrees C \n\n", average);
}*/


//###################################################################################################

// Question 4 Using structures

/*#include <stdio.h>
#include <string.h>

struct city
{
	char name[25];
	char country[25];
	int numofparks;
	float sizesqrm;
};

void main()
{
	city home;
	city away;

	strcpy(home.country, "Wales");
	strcpy(home.name, "Burry Port");
	home.numofparks = 4;
	home.sizesqrm = 560.89;

	strcpy(away.country, "England");
	strcpy(away.name, "London");
	away.numofparks = 36;
	away.sizesqrm = 2003.67;

	printf("City one\n");
	printf("Country is: %s\n",home.country);
	printf("Name is: %s\n",home.name);
	printf("Number of parks are: %d\n",home.numofparks);
	printf("Size of country in square metres is: %.3f\n\n",home.sizesqrm );

	printf("City two\n");
	printf("Country is: %s\n",away.country );
	printf("Name is: %s\n", away.name );
	printf("Number of parks are: %d\n",away.numofparks );
	printf("Size of country in square metres is: %.3f\n", away.sizesqrm);
}*/
