Hi Mohammed,
If you are running the application on a server (Web App preview/ Tomcat), then src="resources/sap-ui-core.js" will work.
But if you are running it on windows browser using the location of index file, then it will not know how to find above path, hence you need to provide the complete path.
regards
Krishna