Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Compiling in xcode App Exercise - Notifications Note These exercises reinforce S

ID: 3754790 • Letter: C

Question

Compiling in xcode

App Exercise - Notifications Note These exercises reinforce Swift concepts in the context of a fitness tracking app. In your app, you may want to search for other users. This would be easier with first and last names stored separately. This is not an uncommon practice. Create firstName and lastName constants and assign them string literals representing a user's first name and last name, respectively. Create a ful LName constant that uses string concatenation to combine firstName and lastName. Print the value of ful LName. 10 Occasionally users of your fitness tracking app will beat previous goals or records. You may want to notify them when this happens for encouragement purposes. Create a new constant congratulations and assign it a string literal that uses string interpolation to create the following string: "Congratulations,

Explanation / Answer

Case 1:

#include <stdio.h>

#include <string.h>

int main() {

String firstname, lastname;

String fullname;

Printf(“Enter your first name:”);

Scanf(“%s”, firstname);

Printf(“Enter your last name:”);

Scanf(“%s”,lastname);

Strcpy (fullname, firstname);

Strcat(fullname, lastname);

Printf(“Fullname: %s”, firstfullname);

}

Case 2:

Include below segment in above code snippet.

long previousBest =14392;

long newBest= 15125;

if(newBest > previousBest)

printf(“Congratulations, %s ! You beat your previous daily high score of %s steps by walking %s steps yesterday!”, fullname, previousBest, newBest);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote