#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#pragma warning (disable:4996)
#define PI 3.142


//Q2
void main() {
	float r, v;
	printf("This program calculates the volume of a sphere. Please enter your 'r' value:");
	scanf(" %f", &r);
	v = 4 / 3 * PI*r*r*r;
	printf("The volume of that sphere is: %f", v);
}


//Q3
void main() {
	float a, temp[5];
	int i;
	printf("Please enter your first temperature (centigrade):");
	scanf(" %f", &temp[0]);
	printf("Please enter your second temperature (centigrade):");
	scanf(" %f", &temp[1]);
	printf("Please enter your third temperature (centigrade):");
	scanf(" %f", &temp[2]);
	printf("Please enter your fourth temperature (centigrade):");
	scanf(" %f", &temp[3]);
	printf("Please enter your fifth temperature (centigrade):");
	scanf(" %f", &temp[4]);

	for (i = 0; i < 5; i++) {
		printf("%f\n", temp[i]);
	}
}

//Q4
struct city {
	char name[50];
	float population;
	char country[50];
	int numOfParks;
};

void main() {
	city cardiff, swansea;
	strcpy(cardiff.name, "Cardiff");
	cardiff.population= 3.200000;
	strcpy(cardiff.country, "Wales");
	cardiff.numOfParks = 12;

	strcpy(swansea.name, "Swansea");
	swansea.population = 3.700000;
	strcpy(swansea.country, "Wales");
	swansea.numOfParks = 17;

	printf("#######\n%s\n#######\n\n", cardiff.name);
	printf("Cardiff has a population of %f\n", cardiff.population);
	printf("Cardiff is located in the country of %s\n", cardiff.country);
	printf("Cardiff has %d parks\n\n", cardiff.numOfParks);

	printf("#######\n%s\n#######\n\n", swansea.name);
	printf("Swansea has a population of %f\n", swansea.population);
	printf("Swansea is located in the country of %s\n", swansea.country);
	printf("Swansea has %d parks\n", swansea.numOfParks);


}