In recent years, applications such as Internet-of-Things has proliferated the Internet to a great extent. Such applications derive data from a significant number of smart sensors sensing information from the environment. Due to an extensive data footprint, the demand for cloud services to process this data has also increased. However, traditional centralized cloud model requires offloading data from these sensors over a network which induces significant network delay on these applications. Several architectural abstractions of cloud, such as Fog and Edge, have been proposed to localize some of the processing near the sensors and away from the central cloud servers. In this paper, we propose Edge-Fog cloud which distributes task processing on the participating cloud resources in the network. We develop the Least Processing Cost First (LPCF) method for assigning the processing tasks to nodes which provide the optimal processing time and near-optimal networking costs. We further provide an energy-efficient variant of LPCF, i.e., eLPCF algorithm, which optimizes energy usage while calculating task deployment in Edge-Fog cloud. We evaluate both LPCF and eLPCF in a variety of scenarios and demonstrate its effectiveness in finding the processing task assignments