Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. C Programming

C Programming

Scheduled Pinned Locked Moved C / C++ / MFC
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 13961348
    wrote on last edited by
    #1

    #include
    #include
    int main()
    {
    double width,hight,area;
    printf("enter the value of width");
    scanf("%f",&width);
    printf("enter the vlaue of hight");
    scanf("%f",&hight);
    area=width*hight;
    printf("area=%f",area);
    return 0;
    }
    Why area=0.000 showing

    V CPalliniC 2 Replies Last reply
    0
    • U User 13961348

      #include
      #include
      int main()
      {
      double width,hight,area;
      printf("enter the value of width");
      scanf("%f",&width);
      printf("enter the vlaue of hight");
      scanf("%f",&hight);
      area=width*hight;
      printf("area=%f",area);
      return 0;
      }
      Why area=0.000 showing

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      I guess either width is zero or hight is zero or both are zero. :cool:

      1 Reply Last reply
      0
      • U User 13961348

        #include
        #include
        int main()
        {
        double width,hight,area;
        printf("enter the value of width");
        scanf("%f",&width);
        printf("enter the vlaue of hight");
        scanf("%f",&hight);
        area=width*hight;
        printf("area=%f",area);
        return 0;
        }
        Why area=0.000 showing

        CPalliniC Online
        CPalliniC Online
        CPallini
        wrote on last edited by
        #3

        The format specifier you used in scanf is wrong: Change from

        Quote:

        scanf("%f",&width);

        to

        scanf("%lf",&width);

        See scanf - C++ Reference[^] Of course you need to make modify the other scanf call as well.

        In testa che avete, signor di Ceprano?

        S 1 Reply Last reply
        0
        • CPalliniC CPallini

          The format specifier you used in scanf is wrong: Change from

          Quote:

          scanf("%f",&width);

          to

          scanf("%lf",&width);

          See scanf - C++ Reference[^] Of course you need to make modify the other scanf call as well.

          S Offline
          S Offline
          Stephen Wade
          wrote on last edited by
          #4

          The c programming is the oriented language which will be going to proceed it for the user which will be going to work for implementing the part which will be more important to exaggerate it so hp support australia will guide you to make you understand the part for the valuable aspects which will keep the user enthusiastic for the work.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups