Search:

Type: Posts; User: iamtazb

Search: Search took 0.01 seconds.

  1. I'm not sure, I'm guessing counting sheeps. ...

    I'm not sure, I'm guessing counting sheeps.

    It's pretty late bud.
  2. There is what my paper looks like: imgur: the...

    There is what my paper looks like:

    imgur: the simple image sharer
  3. Simple Assignment, Can't Figure Out the Calculation

    #include <stdio.h>


    int main(int argc, const char * argv[])
    {


    int stud_num, section, std_section, last_section;
    float cost_factor;
  4. Replies
    3
    Views
    888

    Sorry realized its a & not a % - typo. Oh...

    Sorry realized its a & not a % - typo.

    Oh thats where the problem is, can you give me an example of how to prototype,

    void get_expenses(double* pSchool, double* pLiving, double* pTransp,...
  5. Replies
    3
    Views
    888

    Having trouble with functions

    Hello guys!

    Okay so I'm making a student budget program for class its a basic program using functions and pointers. Here is the template they want us to start with:



    main() {
    float school,...
  6. Replies
    1
    Views
    1,320

    Why isn't my math working?

    #include <stdio.h>


    int main (int argc, const char * argv[])
    {




    int location, vehicle, weekday, peak, km, days;
  7. Replies
    8
    Views
    1,840

    Hmm yeah that fixed it? I guess it was the...

    Hmm yeah that fixed it? I guess it was the spacing? Grammar? o_O
  8. Replies
    8
    Views
    1,840

    This is what I'm getting: ~/c_programming>...

    This is what I'm getting:

    ~/c_programming> ./km
    Enter number of KMs driven:
    1000
    Extra KM: -0.00

    ---

    Basically I want it so if its over 100 KM that it gets charged 0.50cent/KM minus the...
  9. Replies
    8
    Views
    1,840

    thanks fix those problems. can you please tell me...

    thanks fix those problems. can you please tell me why this is not computing correctly?



    printf("Enter number of KMs driven:\n");
    scanf("%d", &km);
    if (km>100){
    ...
  10. Replies
    8
    Views
    1,840

    How come my maths not working?

    #include <stdio.h>

    int main (int argc, const char * argv[])
    {


    int location, vehicle, weekday, peak, km, days;
    float price, insurance;

    printf("Please choose a location(1:...
  11. Replies
    4
    Views
    14,339

    perfect!

    perfect!
  12. Replies
    4
    Views
    14,339

    Great thanks for the tip. I have one little...

    Great thanks for the tip.

    I have one little compiling error: What is wrong with this statement:





    if (vehicle==1 && peak==1){
    0.50*km+15=price;}
  13. Replies
    4
    Views
    14,339

    Car Rental Program

    I'm making a car retal program for a friends new business, heres the deal:

    He has 5 locations, 5 different type of cars in each, different pricing on all, and different price depending if rented...
  14. Thread: min/max/avg

    by iamtazb
    Replies
    8
    Views
    1,491

    Hey so I restarted and I used the suggestions...

    Hey so I restarted and I used the suggestions (thanks)

    I'm kind of stuck here:




    #include <stdio.h>

    main(void){
  15. Thread: min/max/avg

    by iamtazb
    Replies
    8
    Views
    1,491

    I restarted and I'm taking this approach...

    I restarted and I'm taking this approach basically:

    Am I going at it the right way?



    #include <stdio.h>


    main(void){
  16. Thread: min/max/avg

    by iamtazb
    Replies
    8
    Views
    1,491

    min/max/avg

    I'm trying to write this program that does the following:

    User has to input 10 numbers, but also has the option to stop.

    then program should output the min/max/avg



    #include <stdio.h>...
  17. Replies
    14
    Views
    1,455

    My prof never taught us to a) declare main ...

    My prof never taught us to

    a) declare main
    b) add the stuff in the bracket

    Is it beneficial to do it that way or just keep it at



    main(){
  18. Replies
    14
    Views
    1,455

    Thanks for all the help guys! I cleaned up the...

    Thanks for all the help guys! I cleaned up the code and will post an updated version in just a bit
  19. Replies
    14
    Views
    1,455

    here is my updated script with still the 2...

    here is my updated script with still the 2 errors:




    #include <stdio.h>
    #include <stdlib.h>

    main()
    {
  20. Replies
    14
    Views
    1,455

    Awesome got rid of 2/4 errors! Now I'm getting...

    Awesome got rid of 2/4 errors!

    Now I'm getting

    (??what is this) hw2.c: In function 'main':
    (last line of the program) hw2.c:42: error: expected declaration or statement at end of input
  21. Replies
    14
    Views
    1,455

    What is it I'm forgetting!?

    I've been sitting here wondering what it is I'm forgetting and why it is NOT compiling for more than an hour, I've done it via pico and codepad

    Can someone please help!


    #include <stdio.h>...
Results 1 to 21 of 21