• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

count of operands

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is the total code..i wrote till now..i was able to calculate the operator.. but i want a idea how to calculate the operands.
It didnt work using operators as delimiters.
Please help...

--------------------
JAI SHRI KRISHNA
K K
[ November 14, 2002: Message edited by: Michael Ernest ]
 
Greenhorn
Posts: 22
3
Netbeans IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's in the data? Could it be as easy as subtracting the number of operators from the number of words?
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You mentioned that it's not working as you were perhaps hoping. What does it seem to do? What were you expecting it to do? Why did you expect that and what's your best guess as to why it does what it actually seems to do?
 
Kishore
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My Basic question is how to calculate the operands. I mean i need a small logic. Am i supposed to use nextToken() method to calculate tne next character as a operator and using previousToken() method for a space. As i am not able to find a good logical code. Please help me out.
Thanking you,
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic