// This program demonstrates the use of structs // Let's use an example of a taytay friendship bracelet, // as a continuing ode to Sofia. Each bracelet will store // information: // - how many beads there are // - how many letter beads there are // - the length of the string for bracelet in cm // - the initial of who this bracelet is for // Week 2 Lecture 4 #include // 1. Define the struct outside our main struct friendship { int num_beads; int letter_beads; double size; char initial; }; int main(void) { // 2. Declare that you will use a struct struct friendship bracelet; // 3. Assign values to a struct variable // For an int // int number = 10; bracelet.num_beads = 10; bracelet.letter_beads = 5; bracelet.size = 12.3; bracelet.initial = 's'; printf("The friendship bracelet has %d beads\n", bracelet.num_beads); return 0; }