Answer by taking a quote from the following article:

Dean Edwards Smith (February 28, 1931 - February 7, 2015) was an American men's college basketball head coach. Called a "coaching legend" by the Basketball Hall of Fame, he coached for 36 years at the University of North Carolina at Chapel Hill. Smith coached from 1961 to 1997 and retired with 879 victories, which was the NCAA Division I men's basketball record at that time.

Smith next served a stint in the United States Air Force in Germany, later working as a head coach of United States Air Force Academy's baseball and golf teams. Yet, Smith's big break would come in the United States. In 1958, North Carolina coach Frank McGuire asked Smith to join his staff as an assistant coach. Smith served under McGuire for three years until 1961, when McGuire was forced to resign by Chancellor William Aycock in the wake of a major recruiting scandal, and consequently, an NCAA mandated probation. Aycock told WNCN that McGuire told him he was leaving on a Saturday, and Aycock called in Smith and hired him later on that day.  Smith's elevation occurred amid rumors of a point shaving scandal involving UNC players. Smith was told that wins and losses didn't matter as much as running a clean program and representing the university well.  The Atlantic Coast Conference (ACC) had canceled the Dixie Classic, an annual basketball tournament in Raleigh, North Carolina, due to a national point-shaving scandal including a North Carolina player (Lou Brown). As a result of the scandal, North Carolina de-emphasized basketball by cutting their regular-season schedule. In Smith's first season, North Carolina played only 17 games and went 8-9. This was the only losing season he endured during his career. In 1965, he was famously hanged in effigy on the university campus following a disappointing loss to Wake Forest. After that game, UNC would win nine of their last eleven games, and Smith would subsequently go on to turn the program into a consistent success. From 1965-66 onward, Smith's teams never finished worse than tied for third in the ACC. For the first 21 of those years, they did not finish worse than a tie for second. By comparison, during that time the ACC's other charter members each finished last at least once.  His first major successes came in the late 1960s, when his teams won consecutive regular-season and ACC tournament championships, and went to three straight Final Fours. However, this run occurred in the middle of UCLA's stretch of 10 titles in 12 years, and in fact Smith lost to UCLA's John Wooden in the 1968 title game.

Where did he go on to coach after the air force?
In 1958, North Carolina coach Frank McGuire asked Smith to join his staff as an assistant coach.