CAIRO, Egypt (AP) _ President Hosni Mubarak accepted the resignation of Prime Minister Aly Lutfy and his Cabinet on Sunday and named Atef Sedki, a leading economist, to succeed him. He said Sedki's main task would be to solve the country's growing economic woes.

Sedki, 56, was chairman of the Central Auditing Authority and head of a government consultative economic committee.

In a letter to Sedki, Mubarak indicated unhappiness with the performance and lack of cohesion of Lutfy's year-old Cabinet. It was not clear if Mubarak asked Lutfy to resign or if Lutfy felt he no longer had the president's confidence.

Safwat el-Sherif, information minister in Lutfy's 33-member Cabinet, said Lutfy submitted a letter of resignation Sunday on behalf of the entire Cabinet. El-Sherif said Sedki arranged initial talks on his ministerial lineup for Sunday night. He was expected to retain subtantial numbers of the old Cabinet.

The constitution gives the president sole authority to appoint and dismiss the prime minister and Cabinet. Mubarak's National Democratic Party holds 400 of the 458 seats in the People's Assembly, and Sedki does not need to consult with the five small opposition parties to form his Cabinet.

Mubarak named Sedki two days before the assembly convenes a new session. He apparently wanted the new Cabinet in place for the opening.

His letter to Sedki listed 14 prioritites for the new government, headed by: ''Mobilizing all internal and external resources to cope with the economic situation in an effective way that will serve the production sectors and meet the basic needs of the masses.''

The letter dealt entirely with domestic issues, indicating that the change of government would not bring foreign policy shifts.

Referring to economic reform under Lutfy, the letter said: ''The situation still requires more and higher levels of accomplishment and progress in the basic spheres directly related to the people's interests. It also requires greater harmony and coordination within the establishments playing a leading role in implementing the program.''

He expressed hope a new Cabinet ''will respond better to the demands and aspirations of Egyptians.''

Lutfy, an economist and former finance minister, was appointed prime minister in September 1985 in hopes of improving the economy.

But since then, the world oil glut and terrorism which affected the tourism industy have drastically reduced Egypt's foreign currency income.

Depressed oil prices cost Egypt about $1.2 billion in revenue this year, and remittances from expatriate Egyptian oil workers also dropped. Income from tourism fell about 40 percent after a spate of terrorist acts in the region in 1985.

Egypt's foreign debt totals about $36 billion. Officials estimate debt servicing will cost $3 billion in each of the next three years.

The government is negotiating a $1 billion standby credit agreement with the International Monetary Fund to help meet a balance of payments deficit of more than $3 billion. It also is negotiating $800 million loan with the World Bank to finance developmenmt projects.

Just before resigning, Lutfy was considering how to respond to IMF demands for a further cut in the government's $1.47 billion commodity subsidy program and a more realistic exchange rate. Both moves would increase prices.

The official exchange rate is 1.35 Egyptian pounds to the dollar. The black market rate hovers around 1.90 pounds to the dollar.

Mubarak's letter asked Sedki to control prices and strive to increase production, improve agriculture and land reclamation and develop tourism, family planning and health services.

The balding, bespectacled Sedki was cultural attache in Paris for four years in the 1970s.

The state Middle East News Agency said he has written many studies on inflation, prices, government subsidies, monetary policies and investment.