is this what you're looking for?
I used the following formula in my program and with my code, it shows a monthly payment of 332.14 given the 10000.00 amount like your sample output wants.
...
Type: Posts; User: x2x3i5x
is this what you're looking for?
I used the following formula in my program and with my code, it shows a monthly payment of 332.14 given the 10000.00 amount like your sample output wants.
...
you can use for loop or while loop or do/while loop. Any will be fine. Read in your book how to use those and then write the code for it. Shouldn't be difficult.
ok, I tested when I change the SIZE to 1, no error. But when I have 2 or more, I get an error.
when I have SIZE as 1, I can get something like the following as output (click on links to see the...
@hk_mp5kpdw, I'm supposed to have the program print out all of the stock data for each stock and the order printed out will be in alphabetical order on the name. So, what would I have to do in that...
thank you for the fflush(stdin) tip. And ok, I'll check the thing you highlighted, I guess fprint is printing out the word "purchase" to textfile and fgets is reading that same word out of the...
I believe the error lies in the following statements in my code: fgets(s[j].purchase_date, sizeof(s[j].purchase_date),f); and printf("\nPurchase Date: %s\n", s[j].purchase_date);
But it looks ok...
Hi,
I have an array of structures allowing user to enter info on 5 stocks. I have calculated initial cost, current cost, and profit. I have also bubble sorted the array of structures...
Ok, made a revision on the code. I realized I wanted stock name in [j] is to be saved in t before we check the next stock name, which is in [j+1] against the stock name in [j]. t is there just in...
why the "-i"? I had done the bubblesort with regular integers and n-1 was all I needed to get the proper number of times the sorting will be done to get all the values properly sorted.
Hi,
I have written a structure of 5 stocks allowing user to enter info on 5 stocks, the code below is the function I have attempted to write a function using bubblesort to sort the stock names...
I don't think it a problem, if you use the stuff correctly.
but my teacher just said to use fflush(stdin); when you are needing to enter in characters after you have just entered in numbers to clear the buffer.
for example,
#include<stdio.h>
...
Thank you very much, a simple error that I did not catch. :)
Hi,
I've learned structures in class, and I tried out an example given by the teacher. I'm using MS Visual Studio C++ 2008 express. I think I have the code he gave written correctly.
Here's...
I realized that the *profit return is just junk, but how else to fix the problem? Maybe profit is not the right variable to have the result returned back.
ok, but the return statement function?
Bo sorry, haven't learned on arrays except for the char arrays, so a way to go for it?
Here's my entire program code. Return statement basically feeds out a value to the main from the function so that main can use it. I attempted doing return *profit, but obviously that's just a wasted...
I haven't learned structures in class yet, therefore can't use it. Though as far as I understand from my book, structures make great for writing code to make databases.
But what can I do? Still...
Hi,
Need little help on my homework assignment. Let's say I have the information on three stocks which include stock name, buying price, current price, number of shares bought and and yearly...
Ok thank you.
Why would that help? What is the difference?
Hi,
I have written a program that counts number of words in a text file as shown below.
#include "stdafx.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
sorry for late reply, but thanks! it works the way iwanted.
another thing ....
x=6 is often mistaken with x ==6.
x = 6 means, make x equal 6.
x == 6 means, "Is x equal to 6?"