as6a.c - #include #include #include...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 #include <stdlib.h> #include <stdio.h> #include <string.h> char copen(char a[]) int* print(char a[], int *b) void add(int *a, int b, int c) void printanswer(struct node *a) struct node { float constant int power struct node *next } int main() { char filename[200], choice1, choice2 = 'Y', choice3 = 'Y' int *a = NULL, choice4, choice5 while(choice3 == 'Y' || choice3 == 'y') { printf("Enter the file where polynomials are found:\n") scanf("%s", filename) choice2 = copen(filename) while (choice2 == 'Y' || choice2 == 'y') { printf("The polynomials available for operation are\n") a = print(filename, a) printf("What operation would you like to perform?\n1. ADD polynomials\n2. Multiply polynomials\n3. Evaluate polynomial\n\nE n choice1 = choice1 - '0' switch(choice1) { case 1: { printf("Enter the polynomials that you would like to work with\n") add(a, choice4, choice5) break } case 2: { break } case 3: { break } default: { printf("Invaild Entry. Please Try Again.")
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 2 } } printf("Do you want to perform additional operations on the existing file (Y/N)?\n")
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/01/2008 for the course EE 312 taught by Professor Shafer during the Spring '08 term at University of Texas.

Page1 / 12

as6a.c - #include #include #include...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online