User Tools

Site Tools


user:acrowle1:portfolio:cprogproject2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
user:acrowle1:portfolio:cprogproject2 [2014/03/01 02:55] – [Objectives] acrowle1user:acrowle1:portfolio:cprogproject2 [2014/03/01 11:51] (current) wedge
Line 1: Line 1:
-======Project: squares======+======Project: data types======
  
 A project for CSCS1320S14 by Alana Whittier during the Spring Semester 2014. A project for CSCS1320S14 by Alana Whittier during the Spring Semester 2014.
  
-This project was first begunon or around, February, 20, 2014 and took approximately 1 week to complete. The program first submitted is not //incorrect//as it does compile and yields the expected outputalthough it is not necessarily the most elegant or //efficient// script. In the first programa series of 'if' and 'else if' statements were used to ensure appropriate execution of the programAfter some more consideration, decided to try writing the program in an entirely different manner, using both the factor and the remainder to achieve the same output as produced in my first program. However, even this endeavor had it's challenges as I am still not sure how to conditionally tell the compiler for ALL values greater than 95, INCLUDING those that end in 5, to //only// return the error message+This project was begun on January 30, 2014 and took approximately two weeks to complete since had to familiarize myself with data typesformat-specifiersbinary to hex conversiontwo's complement, and bitwise and/or. I suspect that an experienced C programmer would have completed it in well under an hour.
 =====Objectives===== =====Objectives=====
-The purpose of this project is to become familiarized with using a pointer in order to use the scanf() feature for obtaining input from a userAlso, this project serves to introduce a new user of C programming to conditional statements in order to achieve the desired output. In order to successfully compile and execute the program using a mental math techniquea pointer must be applied appropriately, scanf() must be implemented to call for user input and communicate back to the compiler, and the use of conditional statements (if statements, etc.) must be used+The purpose of this project was to become familiar with various data types, their sizes, and the range of values for each typeThis project served as an exercise to explore the various format specifiers per data type and how to represent them in order to acquire the appropriate range of values using sizeof()bitwise and/or (&/|), hex values, and type casting, where necessary, to display the negative values in the range for the signed data types.
 =====Prerequisites===== =====Prerequisites=====
 In order to successfully accomplish/perform this project, the listed resources/experiences need to be consulted/achieved: In order to successfully accomplish/perform this project, the listed resources/experiences need to be consulted/achieved:
user/acrowle1/portfolio/cprogproject2.1393642506.txt.gz · Last modified: 2014/03/01 02:55 by acrowle1