How to Frame a Figg (1971)

Don Knotts is Hollis Figg, the dumbest bookkeeper in town. When the city fathers buy a second-hand computer to cover up their financial shenanigans, they promote Figg to look after things, knowing he’ll never catch on. Their plan backfires when Figg becomes self-important and accidentally discovers their plot.