Thread: Trouble converting float to string

  1. #1
    Registered User
    Join Date
    Aug 2018
    Posts
    7

    Trouble converting float to string

    printf("Enter The Amount You Would Like to Deposit: \n");
    scanf("%f\n", &depositAmount);
    printf("You Entered: $ %.2f\n", depositAmount);

    Output is $?, I'm not sure what's wrong here.

  2. #2
    Registered User
    Join Date
    Aug 2018
    Posts
    7
    Disregard, I fixed it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. trouble converting string to int
    By Dale in forum C# Programming
    Replies: 2
    Last Post: 11-18-2011, 07:49 AM
  2. converting to float
    By jturner38 in forum C++ Programming
    Replies: 5
    Last Post: 12-16-2010, 10:08 PM
  3. A Way of Converting Float to string
    By jimboob in forum C++ Programming
    Replies: 13
    Last Post: 10-07-2004, 11:28 AM
  4. Converting Float to Integer
    By Dum-E in forum C Programming
    Replies: 2
    Last Post: 09-26-2002, 10:15 AM
  5. converting string to float
    By twhubs in forum C Programming
    Replies: 1
    Last Post: 09-16-2001, 09:02 AM

Tags for this Thread