Question
please fix and answer in c++ format
My library > CSC 10... > = zyBooks ORS 8.1: Grouping data: str.. zyBooks catalog Help/FAQ Vanessa Ypatzi 8.1.1: Declaring a s
= = zyBooks My library> CSC 10 > 27BOOKS 8.1: Grouping data: str... zyBooks catalog Help/FAQ Vanessa Ypatzi 1 #include <iostr
0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you have any doubts, please give me comment...

#include<iostream>

using namespace std;

struct PatientData{

    int heightInches;

    int weightPounds;

};

int main(){

    PatientData lunaLovegood;

    cin>>lunaLovegood.heightInches>>lunaLovegood.weightPounds;

    cout<<"Patient data: "

        <<lunaLovegood.heightInches<<" in, "

        <<lunaLovegood.weightPounds<<" lbs"<<endl;

    return 0;

}

nagarajuanagaraju-Vostro-3550:22112019$ g++ patient.cpp nagarajuanagaraju-Vostro-3550:22112019$ 7a.out 63 115 Patient data: 6

Add a comment
Know the answer?
Add Answer to:
please fix and answer in c++ format My library > CSC 10... > = zyBooks ORS...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • C++ NEED HELP WITH MY REVERSE STRING FUNCTION IN LINK LIST A function Reverse, that traverses...

    C++ NEED HELP WITH MY REVERSE STRING FUNCTION IN LINK LIST A function Reverse, that traverses the linked list and prints the reverse text to the standard output, without changing the linked list. ( Pass the linked list by value, you have the freedom to create a doubly linked list that is a copy of the original list in your program before you call the function) #include "pch.h" #include <iostream> #include <string.h> #include <string> using namespace std; #define MAX 512...

  • Having code issues wth my C++ program. My program checks if two binary trees are similar...

    Having code issues wth my C++ program. My program checks if two binary trees are similar and if they're not they return false. My program is return true with different binary trees. Could use some help thanks #include <iostream> #include <string> using namespace std; //Struct of Nodes struct BinarySearchTree { int data; BinarySearchTree *left; BinarySearchTree *right; }; // Inserting nodes into BST BinarySearchTree* insert( BinarySearchTree* node, int val) { if (node == NULL) { BinarySearchTree *newNode = new BinarySearchTree(); newNode->data...

  • please Code in c++ Create a new Library class. You will need both a header file...

    please Code in c++ Create a new Library class. You will need both a header file and a source file for this class. The class will contain two data members: an array of Book objects the current number of books in the array Since the book array is moving from the main.cc file, you will also move the constant array size definition (MAX_ARR_SIZE) into the Library header file. Write the following functions for the Library class: a constructor that initializes...

  • I need to add something to this C++ program.Additionally I want it to remove 10 words...

    I need to add something to this C++ program.Additionally I want it to remove 10 words from the printing list (Ancient,Europe,Asia,America,North,South,West ,East,Arctica,Greenland) #include <iostream> #include <map> #include <string> #include <cctype> #include <fstream> #include <iomanip> using namespace std; void addWord(map<std::string,int> &words,string s); void readFile(string infile,map<std::string,int> &words); void display(map<std::string,int> words);    int main() { // Declaring variables std::map<std::string,int> words;       //defines an input stream for the data file ifstream dataIn;    string infile; cout<<"Please enter a File Name :"; cin>>infile; readFile(infile,words);...

  • In C++ Please for both questions and thank you! Write a predicate function named isEqual that...

    In C++ Please for both questions and thank you! Write a predicate function named isEqual that is passed in 2 vectors of integers and returns true if the vectors are equal, otherwise returns false Two vectors are equal if they have exactly the same values, all in exactly the same location within the vector. You may not use the overloaded vector operator ==, since that is the functionality you are to reproduce. Hint: At what point in your solution can...

  • Need help with a C++ program. I have been getting the error "this function or variable...

    Need help with a C++ program. I have been getting the error "this function or variable may be unsafe" as well as one that says I must "return a value" any help we be greatly appreciated. I have been working on this project for about 2 hours. #include <iostream> #include <string> using namespace std; int average(int a[]) {    // average function , declaring variable    int i;    char str[40];    float avg = 0;    // iterating in...

  • IN C++ My project will be a library management system. It will have seven functions. It...

    IN C++ My project will be a library management system. It will have seven functions. It HAS to contain: classes, structures, pointers and inheritance. fix code according to below 1. Add a new book allows the user to enter in book name and book code Book code has to be in # “Invalid book code” “book name has been added to library” book code will be used to borrow books 2. Add a new user must use first user must...

  • IN C++ Help to fix code Library management program. Error is when i type a letter...

    IN C++ Help to fix code Library management program. Error is when i type a letter into options menu the code breaks. after your edits, the code should still run as normal. CODE: #include<iostream> using namespace std; //structure to store library data class BookDetails{ public: struct library { int code; char title[20]; int status; }; library book_details[100]; }; //structure to store user data class UserDetails:public BookDetails{ public: struct users { int id; char name[20]; int booksNumber; }; users user_details[100]; };...

  •       C++ -- Vector of Bank Accounts (15 pts) Please help! :( Use csegrid or Clion for...

          C++ -- Vector of Bank Accounts (15 pts) Please help! :( Use csegrid or Clion for this part Add on to the lab12a solution(THIS IS PROVIDED BELOW). You will add an overload operator function to the operator << and a sort function (in functions.h and functions.cpp)    Print out the customer’s name, address, account number and balance using whatever formatting you would like    Sort on account balance (hint: you can overload the < operator and use sort from the...

  • c++ Please help! i keep getting an error message. I think my main problem is not...

    c++ Please help! i keep getting an error message. I think my main problem is not understanding the circle calculations function and how both the area and the circumference is returned from the function. I know & needs to be used, but I am unsure how to use it. Copy the following code and run it. You should break it into the following 3 functions getValidinput - which asks the user to enter the radius and then make sure that...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT