I want to print the following prices to screen:
10.95 16.32 12.15
8.22 15.98 26.22
13.54 6.45 18.59
here is the code
#include <stdio.h>
int main()
Type: Posts; User: wonderpoop
I want to print the following prices to screen:
10.95 16.32 12.15
8.22 15.98 26.22
13.54 6.45 18.59
here is the code
#include <stdio.h>
int main()
I got it, i needed to take the maxnum out of the printf and put in firstnum, secnum, thirdnum :)
so actually everything above is corred, even the %d, %f, %d, just not the maxnum in my printf
I pretty much figured that, but when I pass my values, I don't get anything that makes sense, i've tried %d %f %f, still isn't giving me anything correct
I'm studying for my finals.
Write a function named check() that has three arguments. The first argument should accept a integer number, second a floating-point number, the third a...
#include <stdio.h>
#include "intgetnum.h"
#define MAXNUM 2
/* prototype */
int getnum();
int main()
{
int retval = 1;
while (retval != NULL)
{
Cool thanks, i'm almost there, now I know it's the null, I assigned 1 to null but now it just loops with no value hmmm
I fixed that part, it runs, it's just that my value keeps coming back as 0
My instructor, did you test it?
Also, ch != is not what i want, I want the user to enter a space and it will just ask the user for either the 1st number or the second number, whichever they...
It's suppose to just echo back the two numbers the user enters. For practice, and this is how I was told to do it, to put the functions into the header file.
This is what I have in my .c file
#include <stdio.h>
#include "intgetnum.h"
#define MAXNUM 2
/* prototype */
int getnum();
int main()
{
i tried it to see, and all it did was scroll from 4900 until forever. What i need to do is lets say you are a teacher, and you have a X number of students, you want a program that calculates the...
no, the way i have it is
#include <stdio.h>
#include <math.h>
#define MAXCOUNT 5 <- I want this number to be chosen by the user
int main ()
{
int calc;
you want to print the spaces like you are printing the stars.
L /* number of lines */
A /* number of astericks */
S /* number of spaces */
also, you don't need r=0. That is already defined...
how do i prompt a user to choose the number of loops they want.
for example, I know that if I set #define MAXCOUNT 100, it will loop 100 times. What would i put for the user to select the number...
Now what happens if the user types in R?
That's what the while statement is for. If i type in the wrong letter, it goes back to the menu just fine. But i can't figure out how to get it to go back to that same menu each time the person...
It has to be a do while statement. I don't even know anything about goto done yet. If you test the program you will see is no problem breaking the loop, since i can't get one to work yet anyways
this while statement is killing me, i tried it at the end, but it doesn't work right still. I can't think of any other while statement to put at the end, because it works better at the beginning. I...
this is what he told us to use and how he said to use it
THis almost works, but i'm stuck. It terminates, I want it after the user does a problem, returns to the top list.
#include <ctype.h>
#include <stdio.h>
#include <math.h>
int main()
lol are you a teacher?
Thanks, but we aren't there yet (next chapter). I did a program with arrays, which is 3 chapters ahead and he told me to change it.
I think I tried that, a few differnet ways. I still decrypts, just in a reverse order
sum1 = ((num % 10) / 1);
rm1 = ((sum1 + 7) % 10);
sum2 = ((num % 100) / 10);
rm2 = ((sum2 + 7) % 10);
sum3 = ((num % 1000) / 100);
rm3 = ((sum3 + 7) % 10);
sum4 = ((num...
I now did it this way, but the if isn't completely working. If i put in 12345 I get 1 2 3 4 5, if i put in 1112131415 I get the else statement, but if i put in 123456 I get 2 3 4 5 6.
...