Prince George's County developer Ralph D. Rocks sits in a downtown Washington law office, flanked by his accountant and attorney, and says he is not sure how much money he has made on the Pumpkin Hill apartments.

The U.S. Department of Housing and Urban Development, which finanaced the project, dos not know either. Nor does the county.

But a Washington Post examination of hundreds of pages of records shows that what has been a housing disaster for HUD, Prince George's County and Pumpkin Hill's tenants has been a glittering business success for Rocks and his partners.

While the taxpayers have poured about $13 million of HUD money into what only can be described today as largely a slum, Rocks and his partners have emerged from the Pumpkin Hill project nearly $3 million richer.

Rocks and his accountant, Thomas G. Martin, say they cannot confirm the estimated of his profits, which were compiled from HUD and county records. But they agree that the figures are essentially accurate.

How did the "Great Society" housing dream of the 1960s to provide incentives to private developers to build low and moderate cost housing leave this legacy?

For a one-man conglomerate like Rocks, it was not difficult to use the HUD regulations to reap profit, first in the building of apartments, then in operating them, and finally in unloading most of them on the government years later.

Rocks, 61, is a millionaire who has built dozens of apartment buildngs around the area, including other subsidized projects. In 1972, Rocks was convicted of bribing a Prince George's County commissioner in 1964 to influence zoning decisions unrelated to Pumpkin Hill.

Money poured in for Rocks over the years, according to the records. First there were land and construction profits then bonuses to get others to join in the real estate venture and finally gigantic annual tax writeoffs. Development Profits

It all began in 1964, and advance planning was clearly one of Rock's secrets. That year he leased 64 acres of rolling farmland just southeast of the Baltimore Washington Parkway for about $30,000 annually. Rocks also acquire an option to buy parcels of it for $8,000 an acre.

Later that year Rocks -- who already headed a network of development, construction, engineering and property management firms -- formed a partnership to take advantage of a new federal housing program.

The program was set up to make direct federal loans to business partnerships seeking to build low-rent apartments. The loans covered 90 percent of development costs and carried an interest rate of 3 percent, about half the prevailing interest rate at that time.

In return, the partnerships had to agree to rent their apartments on the Pumpkin Hill property, the government loaned him $2.1 million, 90 percent of the projected cost of developing 160 apartments. Rocks was expected to put up $233.917, which represented 10 percent of the project's total cost.

He never did.

Instead, he took advantage of other federal regulations that let him deduct so much from his required investment that he ended up billing the government for about $84,000.

HUD was willing to assume for example that Rocks was putting up $158,000 worth of land toward his 10-percent commitment, although federal records shhow the partnership invested only $89,00o in exercising its option or the initial 9.1 acres of development property.

Between the time him B-W Limited Partnership had obtained the option in 1964 and the time it exercise it, Prince George's County officials had rezoned the land to permit construction of garden apartments, thus greatly enhancing its value. $ rocks also found other ways to reduce his required $234,000 investment. He arranged to have his own construction company, Rocks Engineering, build the project. As both builder and developer, he was permitted a profit equal to 10 percent of the construction costs.

Rocks applied that anticipated profit, $198,288 to the balance he owed under the original investment requirement that wiped out his obligation and in turn put the government in debt to him. He also charged HUD for architect's fees.

When the final calculations were dne, the government owed Rocks $84,699 for developing the privately owned project.

It was his first profit, but it was only the beginning.

When the first 160 apartments were nearing completion in early 1968, Rocks applied to HUD for a new $3.1 million loan to build 222 more apartments. They were to be owned by the new, Second B-W Limited Partnership.

Using the same methods he had used with the first section of Pumpkin Hill, Rocks again managed to increase his gains. Instead, he made a $131,000 profit on the land and $294,859 in profit on the construction so he got $183,172 back from the government.

Later that same year, a Third B-W Limited Partnership was formed and applied to HUD for a loan to build 242 more apartments. The result: a $3.6 million loan and initial development profit of $114,576.

By 1970, when Rocks formed a Fourth B-W Limited Partnership HUD had created yet another program giving developers new financial incentives to build low-cost housing.

That program required the developer to obtain private financing rather than a direct federal loan, but the government agreed to guarantee the loan and subsidize the developer's interest payments. The Fourth B-W partnership got a $3 million federally insured mortgage at an effective interest rate of 1 percent.

The new arrangement also permitted owners to charge normal rents for their apartments instead of the artificial low rates required under the earlier program. The government then helped the tenants pay their rent, while the project owners enjoyed higher incomes.

Although the new program was different, Rock's old formula for success didn't change. The Fourth B-w Limited Partnership made a $133,500 land profit, collected a $283,556 construction profit and got back a total of $82,740 from HUD.

That brought Rock's total development profit on Pumpkin Hill's four sections to $466,000. Syndication Gains

Pumpkin Hill was an attractive property for investors in search of tax shelters. By buying a limited interest in the project, businessmen or wealthy individuals were able to take yearly tax deductions, for depreciation as Pumpkin Hill's building aged.

Rocks sold shares in each of the partnerships to a total of 14 businessmen and their families, who became "limited partners."

Each investor agreed to pay part of the 10-percent cash investment which Rocks was supposed to have made. Because Rocks was already ahead of the game with his land and construction profits, the limited partners, investments essentially, only increased his gains.

Rock's accountant, Martin, said it was the view of the partnership that the limited partners' investment actually paid the private development costs of Pumpkin Hill and that Rock's profit came from his land and construction.

However, Rocks' profit would have been the same. Martin agreed, if he had kept the investors' contributions and used part of his land and construction profits to cover development costs.

From the time it opened in 1968, Pumpkin Hill's balance sheets showed losses every year. That meant continuing tax benefits for Rocks and his partners.

Each year, the members of each of the four partnerships distributed the losses among themselves, according to their shares of ownership. Each investors could deduct the losses from his personal income acquired from other sources. Because the owners were in the highest tax brackets -- at or near 50 percent -- they were able to deduct about $1 from the actual taxes they paid each year for every $2 Pumpkin Hill lost.

The project's losses increased rapidly. In 1974,, for example, the first section of Pumpkin Hill showed an operating loss of $1,290. The next year, the operating loss approached $10,000, quadrupled again in 1976 and broke $100,000 in 1977.

By the end of 1977, the last year for which project records are available, Rocks and the other owners should have been able to write off -- counting depreciation on all four sections -- at least $6.5 million on their personal income tax returns.Thus, they could save about half that, or more than $3 million in actual taxes.

Although personal income tax returns are confidential, Rock's share of this windfall should have been close to $1 million. So with his $500,000 development profit and $1 million from the other investors his overall gains on the project were close to $2.5 million.

Rock's other partners, who had originally put close to $1 million into the project, shared an estimated $1.25 million in tax reductions among themselves.

That would appear to give Rocks and his partners a joint total of $3.75 million in gains on Pumpkin Hill. However, the owners did have to pay some of the costs of the project.

After the construction loan was negotiated the owners had to pay some minor construction costs, and were required to make a "working capitals deposit" for each of the four sections to cover costs overruns and incidental expenses. The owners invested about $410,000 for these items, HUD records show.

In addition, Rock and his partners advanced at last $550,000 to the project by the end of 1977 to defray the losses of the first three section.

Thus, the final total of the owners' profits on Pumpkin Hill came to an estimated $2.8 million by the end of 1977, according to calculations based on records. Rocks' share of that total, by these figures ranged from $1.5 million to $1.9 million.

Rocks and his associates said that the owners continued to make tax gains in 1978. But they added that the partners could be subject to more than $1 million in capital gains and other taxes this year, depending on te outcome of various Internal Revenue decisions.

This summary of the profits that Rocks and his partners made in developing the Pumpkin Hill project does not include all of his earnings.

A total of at least $300,000 was paid to a Rock-owned firm that managed the project, even after the firm advanced Pumpkin Hill over $200,00. And Rocks Engineering was paid tens of thousands of dollars for repairing apartments. The Owners Problems

The annual operating losses at Pumpkin Hill meant more than simple tax gains for the owners. They also meant that the project was deteriorating physically as tenants moved out and apartments stood vacant and were vandalized.

Rocks said he did everything possible to reduce the operating losses. And county and federal officials support his contention that Pumpkin Hill's financial conditions could not be blamed wholly on the owners.

Rocks and his supporters said federal regulations restricting rent increases at the first three projects prevented the owners from passing along rising costs. As inflation accelerated in the early 1970s, Pumpkin Hill went into a tailspin, first having to put off necessary maintenance and eventually falling behind in loan payments.

Rocks said he could have stopped the social and economic decline of Pumpkin Hill in 1976 if he had obtained $600,000 in new government subsidies he requested.

The added funding was approved by HUD officials, but was devoted by then-Prince George's County Executive Winfield M. Kelly Jr., who feared it would draw poor families from outside the county into the project. It was Kelly's veto, Rocks said, that crippled Pumpkin Hill, not his own management. The Government Bailout

The increasing losses and decline eventually caused HUD officials to take extensive and costly measures -- at Rocks' request -- to bail the project out.

Between 1974 and 1977, HUD suspended the owners' mortgage payments for almost two years and permitted frequent rent increases that raised some rents by as much as 72 percent.

HUD also permitted the partners to defer $235,000 in interest payments. These payments could have been claimed as tax deductions, although the interest was never paid.

Some federally controlled money which was set aside specifically for repairs was later released for use in paying such operating expenses as telephone bills and utility costs.

Finally, when even those extraordinary measures failed and the county threatened to condemn the entire Pumpkin Hill project, the owners last February deeded the first three sections -- including most of the problem-plagued apartments -- to the government.

They thus freed themselves from paying back at last $95,000 withdrawn from the escrow account, and HUD picked up nearly $100,000 in outstanding bills.

The agency also cancelled all outstanding debts on the first thress sections, inlcluding $8 million in development loans.

Rocks defaulted on the loan on the fourth section, which the government had insured and had paid off at a cost of $2.9 million. To avoid losing that property, the newest and most promising of the four projects, Rocks is now trying to keep up a new payment schedule on that debt.

HUD could recover some of its millions by selling the first three sections to new owners. But even after spending well over $1 million more for repairs, the agency isn't likely to recoup officials say. According to a recent report, resales of HUD projects have yielded the agency an average of 30 percent of its costs and payments on a project.

Meanwhile, Rocks is optimistic about the future of the heavily subsidized Birchwood Gardens, the fourth section of Pumpkin Hill.

"Birchwood Gardens is coming along very nicely," he said in a recent interview. "I don't think I'll have any problems there with housing code violations.It's picking up financially. CAPTION: Pictures 1 and 2, Ralph D. Rocks, developer of the Pumpkin Hill apartments in Prince George's County, has his business headquarters in River Towers in Alexandria. Photos by Gerald Martineau -- The Washington Post