//Rhys Gareth Roberts 1702521
//Question 2

/*#include <stdio.h>

void main()
{
	int r;
	float total;
	printf("Please enter the radus of the sphere:");
	scanf("%d", &r);

	total = 4 / 3 + 3.142 *r*r*r;
	printf("the total volum of thr sphear was: %f\n\n", total);

}*/


//Question 3

/*#include <stdio.h>

void main()
{
	int temperatures[5];
	int i;
	int avarage;
	int total;
	printf("Enter a temperature:");
	scanf("%d", &temperatures[0]);
	printf("Enter a temperature:");
	scanf("%d", &temperatures[1]);
	printf("Enter a temperature:");
	scanf("%d", &temperatures[2]);
	printf("Enter a temperature:");
	scanf("%d", &temperatures[3]);
	printf("Enter a temperature:");
	scanf("%d", &temperatures[4]);

	for (i = 0; i < 5; i++)
	{
		printf("%dc\n", temperatures[i]);
	}
	total = temperatures[0] + temperatures[1] + temperatures[2] + temperatures[3] + temperatures[4];
	avarage = total / 5;
	printf("The average was %i\n", avarage);
}*/

//Question 4

#include <stdio.h>
#include <string.h>

struct city
{
	char name[10];
	float population;
	char country[10];
	int numberofparks;
};

void main()
{
	city one;
	city two;

	strcpy(one.name, "Swansea");
	one.population = 0.2;
	strcpy(one.country, "Wales");
	one.numberofparks = 10;

	strcpy(two.name, "London");
	two.population = 9.0;
	strcpy(two.country, "England");
	two.numberofparks = 50;

	printf("City One\n");
	printf("%s\n", one.name);
	printf("The population size is %.2f Million\n", one.population);
	printf("%s\n", one.country);
	printf("There are %d parks\n\n", one.numberofparks);

	printf("City two\n");
	printf("%s\n", two.name);
	printf("The population size is %.2f Million\n", two.population);
	printf("%s\n", two.country);
	printf("There are %d parks\n\n", two.numberofparks);
}