Merging 3 sketches NOOB ALERT!

I'm sorry. I'm literally none the wiser. I've zero experience with these whatsoever. I was aware of the mistakes because it tells me about the conflicting declaration at the bottom.. Not because I understand what is happening lol.

it's the int val and boolean val I'm confused with.

#include <dht.h>
#define dht_apin A0 // Analog Pin sensor is connected to

int ledPin = 13; // choose the pin for the LED
int pirPin = 2; // PIR input pin (for PIR sensor)
int pirState = LOW; // we start, assuming no motion detected
int pir = 0; // variable for reading the pin status

int micPin=7; // microphone input pin
boolean mic =0;

int tempPin=A0; // Temperature input pin
boolean temp =0;

Assuming you mean something like that? I get what you are saying.