just dont eat all the time
Well, I recently watched video about guy who didn't eat for 41 days.
I don't really thing that's the correct the way to do it, ever heard about yoyo effect?
But if you're really going to do this do remember about drinking things like juices, coca cola (can be sugar free) - some kind of drink with electrolytes.
And if you're going to fast for longer than few days then consult a doctor. Don't fast if you have some illness or not sure about your health state.
I've seen one person fasting nearly to death

Another idea: you may try soylent. Or some commercial alternative e.g. Slim Fast.
You need to eat properly and drink plenty of water in order to lose weight effectively without having to exercise.
Some amount of exercise is good for losing weight. I know that metabolism boosting effects of (cardio) exercises has been challenged, but on my personal example I can say it gives you boost in motivation for dieting - if you get tired of exercises you don't want this effort to go to waste so you're motivated to keep dieting.