Then has there not been a [single] city that believed so its faith benefited it except the people of Jonah? When they believed, We removed from them the punishment of disgrace in worldly life and gave them enjoyment for a time.(quran, 10:98)
so the people of jonah are the only city that benefited from faith? why? does it because they fast 40days?
4Then Jonah began to go through the city one day’s walk; and he cried out and said, “Yet forty days and Nineveh will be overthrown.” 5Then the people of Nineveh believed in God; and they called a fast and put on sackcloth from the greatest to the least of them. 6When the word reached the king of Nineveh, he arose from his throne, laid aside his robe from him, covered himself with sackcloth and sat on the ashes. 7He issued a proclamation and it said, “In Nineveh by the decree of the king and his nobles: Do not let man, beast, herd, or flock taste a thing. Do not let them eat or drink water. 8“But both man and beast must be covered with sackcloth; and let men call on God earnestly that each may turn from his wicked way and from the violence which is in his hands. 9“Who knows, God may turn and relent and withdraw His burning anger so that we will not perish.” 10When God saw their deeds, that they turned from their wicked way, then God relented concerning the calamity which He had declared He would bring upon them. And He did not do it.