I'm not sure if this is sci-fi, might be more humour (my mind keeps connecting it to Hitchhiker's Guide, so maybe same author/style, but really not sure about that).
Anyway, the key part I'm trying to find is someone writes software where, you enter the facts and the problem you are trying to solve, and the software uses the facts to produce the logical solution. This initial version doesn't sell at all.
So they rewrite the software so that you give it the facts AND the conclusion you want to reach, and the software produces the arguments that gets you there (whether logical or not).
I think there was a crack about the army and navy using it, but different versions..?
This was probably not a key part of the story (maybe only a page or two in the entire book), but it's the part I remember and liked the most.
Update: I read this at least 10 years ago, but it probably wasn't new even then.