Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Doubt in Modulus Operator in C

 
Ranch Hand
Posts: 207
3
Oracle MySQL Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers, I want to ask about this Simple Calculator program which is in C language



Can anyone please tell that why I am getting the error at the case of Modulus operator ?

Thanks in Advance
 
Saloon Keeper
Posts: 12126
258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you get an exception that you don't know how to deal with, always copy it so people know what's going wrong.

Anyway, it's likely that the modulus operator isn't defined for floating point operands.
 
O Shea
Ranch Hand
Posts: 207
3
Oracle MySQL Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:When you get an exception that you don't know how to deal with, always copy it so people know what's going wrong.



Definitely, i will take care about it, next time.

Stephan van Hulst wrote:
it's likely that the modulus operator isn't defined for floating point operands.



Ok, thank you very much.
 
Creativity is allowing yourself to make mistakes; art is knowing which ones to keep. Keep this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic