Skip to content
Open

gf #3

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Ch4AppE10.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include <iostream>

using namespace std;

int main ( )
{
float userNUmber;
float owe;

int change, amount, quarters, dimes, nickels, pennies; // declare variables
cout <<"Enter the amount of money: ";
cin >> userNUmber; // input the amount of change
cout << "Enter how much you owe: ";
cin >> owe;


change = (userNUmber - owe) * 100;
quarters = change / 25; // calculate the number of quarters
change = change % 25; // calculate remaining change needed
dimes = change / 10; // calculate the number of dimes
change = change % 10; // calculate remaining change needed
nickels = change / 5; // calculate the number of nickels
pennies = change % 5; // calculate pennies

cout << "\nQuarters: " << quarters << endl; // display # of quarters
cout << " Dimes: " << dimes << endl; // display # of dimes
cout << " Nickels: " << nickels << endl; // display # of nickels
cout <<" Pennies: " << pennies << endl; // display # of pennies
return (0);
}
29 changes: 29 additions & 0 deletions Ch4Appe06.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include <iostream>

using namespace std;

int main()
{
double width = 0.0;
double length = 0.0;
double height = 0.0;


cout << "enter the width ";
cin >> width;

cout << "enter the length ";
cin >> length;

cout << "enter the height ";
cin >> height;

double volume = width * length * height;

cout << "The volume is " <<
volume;

return 0;

}

16 changes: 16 additions & 0 deletions ch4AppE02.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <iostream>

using namespace std;

int main()
{
int number = 0;

cout << "enter a number so I can square it for you ";
cin >> number;
int sn = number * number;
cout << sn << endl
;
return 0;
}

16 changes: 16 additions & 0 deletions untitled4/ch4AppE02.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <iostream>

using namespace std;

int main()
{
int number = 0;

cout << "enter a number so I can square it for you ";
cin >> number;
int sn = number * number;
cout << sn << endl
;
return 0;
}

16 changes: 16 additions & 0 deletions untitled4/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <iostream>

using namespace std;

int main()
{
int number = 0;

cout << "enter a number so I can square it for you ";
cin >> number;
int sn = number * number;
cout << sn << endl
;
return 0;
}

6 changes: 6 additions & 0 deletions untitled4/untitled4.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TEMPLATE = app
CONFIG += console
CONFIG -= qt

SOURCES += main.cpp

432 changes: 432 additions & 0 deletions untitled4/untitled4.pro.user

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions untitled5/Ch4Appe06.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include <iostream>

using namespace std;

int main()
{
double width = 0.0;
double length = 0.0;
double height = 0.0;


cout << "enter the width ";
cin >> width;

cout << "enter the length ";
cin >> length;

cout << "enter the height ";
cin >> height;

double volume = width * length * height;

cout << "The volume is " <<
volume;

return 0;

}

28 changes: 28 additions & 0 deletions untitled5/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include <iostream>

using namespace std;

int main()
{
double width = 0.0;
double length = 0.0;
double height = 0.0;


cout << "enter the width ";
cin >> width;

cout << "enter the length ";
cin >> length;

cout << "enter the height ";
cin >> height;

double volume = width * length * height;

cout << "The volume is" << volume;

return 0;

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
#############################################################################
# Makefile for building: untitled
# Generated by qmake (2.01a) (Qt 4.8.2) on: Fri Dec 12 04:42:23 2014
# Project: ../untitled/untitled.pro
# Template: app
# Command: /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile ../untitled/untitled.pro
#############################################################################

####### Compiler, tools and options

CC = gcc
CXX = g++
DEFINES = -DQT_WEBKIT
CFLAGS = -pipe -O2 -Wall -W $(DEFINES)
CXXFLAGS = -pipe -O2 -Wall -W $(DEFINES)
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I../untitled -I../untitled -I.
LINK = g++
LFLAGS = -Wl,-O1
LIBS = $(SUBLIBS)
AR = ar cqs
RANLIB =
QMAKE = /usr/bin/qmake-qt4
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
STRIP = strip
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p

####### Output directory

OBJECTS_DIR = ./

####### Files

SOURCES = ../untitled/main.cpp
OBJECTS = main.o
DIST = /usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/common/gcc-base.conf \
/usr/share/qt4/mkspecs/common/gcc-base-unix.conf \
/usr/share/qt4/mkspecs/common/g++-base.conf \
/usr/share/qt4/mkspecs/common/g++-unix.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
/usr/share/qt4/mkspecs/features/default_pre.prf \
/usr/share/qt4/mkspecs/features/release.prf \
/usr/share/qt4/mkspecs/features/default_post.prf \
/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
/usr/share/qt4/mkspecs/features/warn_on.prf \
/usr/share/qt4/mkspecs/features/resources.prf \
/usr/share/qt4/mkspecs/features/uic.prf \
/usr/share/qt4/mkspecs/features/yacc.prf \
/usr/share/qt4/mkspecs/features/lex.prf \
/usr/share/qt4/mkspecs/features/include_source_dir.prf \
../untitled/untitled.pro
QMAKE_TARGET = untitled
DESTDIR =
TARGET = untitled

first: all
####### Implicit rules

.SUFFIXES: .o .c .cpp .cc .cxx .C

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"

####### Build rules

all: Makefile $(TARGET)

$(TARGET): $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)

Makefile: ../untitled/untitled.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/common/gcc-base.conf \
/usr/share/qt4/mkspecs/common/gcc-base-unix.conf \
/usr/share/qt4/mkspecs/common/g++-base.conf \
/usr/share/qt4/mkspecs/common/g++-unix.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
/usr/share/qt4/mkspecs/features/default_pre.prf \
/usr/share/qt4/mkspecs/features/release.prf \
/usr/share/qt4/mkspecs/features/default_post.prf \
/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
/usr/share/qt4/mkspecs/features/warn_on.prf \
/usr/share/qt4/mkspecs/features/resources.prf \
/usr/share/qt4/mkspecs/features/uic.prf \
/usr/share/qt4/mkspecs/features/yacc.prf \
/usr/share/qt4/mkspecs/features/lex.prf \
/usr/share/qt4/mkspecs/features/include_source_dir.prf
$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile ../untitled/untitled.pro
/usr/share/qt4/mkspecs/common/unix.conf:
/usr/share/qt4/mkspecs/common/linux.conf:
/usr/share/qt4/mkspecs/common/gcc-base.conf:
/usr/share/qt4/mkspecs/common/gcc-base-unix.conf:
/usr/share/qt4/mkspecs/common/g++-base.conf:
/usr/share/qt4/mkspecs/common/g++-unix.conf:
/usr/share/qt4/mkspecs/qconfig.pri:
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:
/usr/share/qt4/mkspecs/features/qt_functions.prf:
/usr/share/qt4/mkspecs/features/qt_config.prf:
/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
/usr/share/qt4/mkspecs/features/default_pre.prf:
/usr/share/qt4/mkspecs/features/release.prf:
/usr/share/qt4/mkspecs/features/default_post.prf:
/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
/usr/share/qt4/mkspecs/features/warn_on.prf:
/usr/share/qt4/mkspecs/features/resources.prf:
/usr/share/qt4/mkspecs/features/uic.prf:
/usr/share/qt4/mkspecs/features/yacc.prf:
/usr/share/qt4/mkspecs/features/lex.prf:
/usr/share/qt4/mkspecs/features/include_source_dir.prf:
qmake: FORCE
@$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile ../untitled/untitled.pro

dist:
@$(CHK_DIR_EXISTS) .tmp/untitled1.0.0 || $(MKDIR) .tmp/untitled1.0.0
$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/untitled1.0.0/ && (cd `dirname .tmp/untitled1.0.0` && $(TAR) untitled1.0.0.tar untitled1.0.0 && $(COMPRESS) untitled1.0.0.tar) && $(MOVE) `dirname .tmp/untitled1.0.0`/untitled1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/untitled1.0.0


clean:compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core


####### Sub-libraries

distclean: clean
-$(DEL_FILE) $(TARGET)
-$(DEL_FILE) Makefile


check: first

compiler_rcc_make_all:
compiler_rcc_clean:
compiler_uic_make_all:
compiler_uic_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
-$(DEL_FILE) qmake_image_collection.cpp
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean:

####### Compile

main.o: ../untitled/main.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o ../untitled/main.cpp

####### Install

install: FORCE

uninstall: FORCE

FORCE:

Binary file not shown.
Binary file not shown.
Loading