User Tools

Site Tools


user:acrowle1:portfolio:cprogproject5

Project: Nikhilam

A project for C/C++ Programming (CSCS1320S14) by Alana Whittier during the Spring Semester, 2014.

This project took ~1 week to write in it's entirety. By 1 week, I am stating that working on it an hour or so here and there within that span.

Objectives

The purpose of this project is to implement a programmatic solution utilizing a mental math trick of multiplying two numbers together that share a common power of 10.

Prerequisites

In order to successfully accomplish/perform this project, the listed resources/experiences need to be consulted/achieved:

  • ability to obtain user input
  • ability to use selection statements
  • ability to use both variables and mathematical functions or expressions to obtain expected results utilizing the mental math multiplication technique described in the assignment link provided above.

Background

The premise of this project is to implement a special math technique for multiplying two numbers together that share a common power of 10. This technique is a simplification of the multiplication process that most of us were taught. This process can enable deriving a result without using a calculator, enhanced mathematical software, or without having to use half a sheet of paper to calculate by hand.

Nikhilam is one of sixteen Vedic Math sutras, meaning “all from nine, the last from ten”. For this project, the Nikhilam multiplication process is implemented programmatically to produce the resultant using the prescribed technique. Provided that both numbers input by the user share a common power of 10, the technique will perform the process in perhaps a more efficient way.

Please see project assignment page: Project: MENTAL MATH (nikhilam: All from 9, the last from 10)

Scope

Give a general overview of your anticipated implementation of the project. Address any areas where you are making upfront assumptions or curtailing potential detail. State the focus you will be taking in implementation.

Attributes

State and justify the attributes you'd like to receive upon successful approval and completion of this project.

  • attribute1: why you feel your pursuit of this project will gain you this attribute
  • attribute2: why you feel your pursuit of this project will gain you this attribute
  • etc…

Procedure

The actual steps taken to accomplish the project. Include images, code snippets, command-line excerpts; whatever is useful for intuitively communicating important information for accomplishing the project.

Code

Upon completion of the project, if there is an applicable collection of created code, place a copy of your finished code within <code> </code> blocks here.

/*
 * hello.c - A sample "Hello, World!" program
 * 
 * written by NAME for COURSE on DATE
 *
 * compile with:
 *   gcc -o hello hello.c
 *
 * execute with:
 *   ./hello
 */
 
#include <stdio.h>
 
int main()
{
    printf("Hello, World!\n");    // Output message to STDOUT
    return(0);
}

Execution

Again, if there is associated code with the project, and you haven't already indicated how to run it, provide a sample run of your code:

lab46:~/src/cprog$ ./hello
Hello, World!
lab46:~/src/cprog$ 

Reflection

Comments/thoughts generated through performing the project, observations made, analysis rendered, conclusions wrought. What did you learn from doing this project?

References

In performing this project, the following resources were referenced:

  • URL1
  • URL2
  • URL3 (provides useful information on topic)
  • URL4

Generally, state where you got informative and useful information to help you accomplish this project when you originally worked on it (from Google, other wiki documents on the Lab46 wiki, etc.)

user/acrowle1/portfolio/cprogproject5.txt · Last modified: 2014/03/23 18:01 by acrowle1