Changing out stacked Washer dryer
We can't answer that merely from what you have said. 

Generally washing machines fall into two types:  normal types, which take hot and cold water connections; and heating types, which take cold-only and need more electrical power because they heat water internally.   The latter is more expensive but means you don't need to plumb a hot water line. 

You can run a normal washer without a hot water line, but it won't clean clothes as well. 

Generally dryers fall into two types:  Vented dryers, which have a vent to the outside.  This is how they remove water vapor from clothing - it's driven out in the air.  This also lets them dispose of natural gas exhaust. Or condensing dryers, which remove water using an internal dehumidifier-type device - instead of a vent pipe, they need a water drain connection.  Condensing dryers don't have a vent, so they can't be gas. 

You can't run a vented dryer without a vent. Seriously, you do not want to do that.  You'll be putting gallons of water into the air everytime you run it, which will condense in bad places and rot out your home or spread mold.  

Some stacked or partnered washer/dryers also share power supply.  For instance one common type uses a 240V/30A connection for the dryer, then the washer gets its electricity from the dryer.  This means you don't need a separate power hook-up for the washer.  

In some multi-unit developments, the developer selects washer-dryers which are a) condensing, b) heating, and c) shared power supply.  This means they don't need to connect a dryer vent, hot water, or 120V power, which saves so much on the building that it justifies the more expensive washer-dryer.  If you're in such a building, you need to be aware of this and order compatible washer-dryers.