Praise be to Allah.
The Ramadan fast, and indeed any righteous deed, is not accepted if you do not pray. That is because not praying constitutes kufr as the Prophet (peace and blessings of Allah be upon him) said: “Between a man and shirk and kufr there stands his giving up prayer.” Narrated by Muslim, 82. See also question no. 5208.
No righteous deed is accepted from the kaafir, because Allah says (interpretation of the meaning): Readmore