//Silvia Settle 1708386
//Date: 14/05/2018
#include<stdio.h>
#include <string.h>

/*
//Question 2: Volume of sphere
void main()
{
	float pi = 3.142;
	float volume, r;

	printf("This program will calculate the volume of a sphere\n");
	printf("Please enter the radius of the sphere:\n");
	scanf("%f", &r);
	volume = (4 / 3 * (pi*r*r*r));
	printf("The volume of a sphere with radius %.0f measurement units is %.2f cubic units. \n",r,volume);
}
*/

/*
//Question 3: Using arrays
void main()
{
	float degrees_array[5];//creating an array with 5 elements that will hold integers
	int i;
	float average_temp;
	float total=0;

	printf("This program will ask you to enter\n5 temperature measurements,\nit will display them back to you\n and then calculate their average \n");
	for (i = 0; i < 5; i++)
	{
		printf("Please enter temperature: ");
		scanf("%f", &degrees_array[i]);
		total = total + degrees_array[i];
	}
	//printf("%.2f", total);//test print
	for (i = 0; i < 5; i++)
	{
		printf("The %d temperature you entered was %.2f degrees Celsius \n", i, degrees_array[i]);
	}
	average_temp = total /5;
	printf("The average temperature is %.2f degrees Celsius\n", average_temp);
}
*/

/*
//Question 4: Using Structures
//the blueprint of the 'city' structure
struct city
{
	char name[35];
	float population;
	char country[45];
	int parks;
};
//the main function
void main()
{
	city city[2];//declare the two objects for city 1 and city 2 to be stored in an array
	int i;//to use for the printing loop
	//city1
	strcpy(city[0].name, "Sofia");
	strcpy(city[0].country, "Bulgaria");
	city[0].population = 2.5;
	city[0].parks = 53;
	//city2
	strcpy(city[1].name, "Swansea");
	strcpy(city[1].country, "Wales");
	city[1].population = 2.5;
	city[1].parks = 167;
	//the printing loop for the two elements in the city structure
	for (i = 0; i < 2; i++)
	{
		printf("City %d is: '%s' \nfrom the country '%s'\nwith population %.2f million\nand %d parks.\n", i+1, city[i].name, city[i].country, city[i].population, city[i].parks);
		printf("\n");
	}
	

}
*/