Function Learning Outcome

PHOTO EMBED

Tue Jun 11 2024 10:26:42 GMT+0000 (Coordinated Universal Time)

Saved by @meanaspotato #c #function

#include <stdio.h>

void print_assessments(int learning_outcome);

int main()
{
    int learning_outcome;
    
    scanf("%d",&learning_outcome);
    printf("Learning Outcome?\n");
    print_assessments(learning_outcome);
    
}

void print_assessments(int learning_outcome)
{
    if(learning_outcome == 0 || learning_outcome > 10)
    {
        printf("Invalid Learning Outcome.");
    }
    if(learning_outcome >=1 && learning_outcome <= 10)
    {
        printf("\nReporting Journal\n");
    }
    if(learning_outcome >=1 && learning_outcome <= 6)
    {
        printf("Practical Test 1\n");
    }
    if(learning_outcome >=1 && learning_outcome <= 8)
    {
        printf("Practical Test 2\n");
    }
    if(learning_outcome >=1 && learning_outcome <= 9)
    {
        printf("Practical Test 3\n");
    }
    if(learning_outcome >=1 && learning_outcome <= 10)
    {
        printf("Final Practical Exam\n");
    }
    
}
content_copyCOPY

Objective: Create a program that asks the user for a learning outcome number and then displays which assessment events cover that learning outcome. Functions to Implement: Function Prototype: Declare a prototype for the function: void print_assessments(int learning_outcome); Function Definition: Function name: print_assessments Parameter: learning_outcome: Integer. Represents the learning outcome number. Functionality: Depending on the provided learning outcome, the function should print the assessments that cover that outcome based on the table provided: Reporting Journal: 1-10 Practical Test 1: 1-6 Practical Test 2: 1-8 Practical Test 3: 1-9 Final Practical Exam: 1-10 If the outcome number is outside of 1-10, print Invalid Learning Outcome. For example: Input Result 0 Learning Outcome? Invalid Learning Outcome.