Advertisement
Dprogrammed1

cplus

Apr 1st, 2019
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2.     using namespace std;
  3.     int main()
  4.     {
  5.         struct ShoeType
  6.         {
  7.            string style;
  8.            double price;
  9.         };
  10.          ShoeType shoe1, shoe2;
  11.          shoe1.style = "Adidas";
  12.          shoe1.price = 9.99;
  13.          cout << shoe1.style << " $ "<< shoe1.price;
  14.          shoe2 = shoe1;
  15.          shoe2.price = shoe2.price / 9;
  16.          cout << shoe2.style << " $ "<< shoe2.price;
  17.          return 0;
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement