Skip to main content

Posts

C++ Program for solving 2nd equatiion of motion (Kinematics)

As we know the 2nd equation of motion   #include<iostream> #include<cmath> using namespace std; void main() { double vi, vf, a, s; int eq; cout << "Press 1 to solve for acceleration, 2 for distance, 3 for initial velocity and 4 for final velocity \n"; cin >> eq; if (eq == 1) { cout << "Enter vf, vi and s \n"; cin >> vf >> vi >> s; a = (pow(vf, 2) - pow(vi, 2)) / (2 * s); cout << "Acceleration is " << a << endl; } else if (eq == 2) { cout << "Enter vf, vi and a \n"; cin >> vf >> vi >> a; s = (pow(vf, 2) - pow(vi, 2)) / (2 * a); cout << "Distance is " << s << endl; } else if (eq == 3) { cout << "Enter vf, s and a \n"; cin >> vf >> s >> a; vi = sqrt(pow(vf, 2) - 2 * a*s); cout << "Initial velocity is " <...

Mushkpuri Diaries

        What else can be better than having fun with friends? A long awaited morning came. We were done with the OHTs, it was exhausting. Who likes exams?               A good turned evil friend of mine, kicked me out of the bed when it was 5 on the clock and I was like WTF. We reached the bus stop at 6. OK, forget about the time, we were in the Bus and we even had breakfast in the Bus. We were about to leave the boundaries of College of Electrical and Mechanical Engineering, NUST (CEME, NUST).             There were 5 Buses, we were in a great number and it was our first trip from CEME, NUST to Mushkpuri top.  4 seniors came in our Bus, afterwards. The term Senior, is often terrifying to some, but we had a lot of fun with them.         When the journey started, our beloved Class Representative (CR) started making crazy faces and moves to entertain us, but we are g...

How to develop entrepreneurial skills?

        Its 21st century and nobody likes to work under someone, underpaid and unfulfilled. Rather, everyone likes others to work for them. But becoming an entrepreneur is not a piece of cake. You need some skills to excel in this particular field. Giving an idea and making a business modal comes afterward.         So, what skills you need to be an entrepreneur? Let's see... Creativity             Creativity is the root of entrepreneurship. Creativity is something, which comes through your smart-work rather than hard work. The people who procrastinate, about everything tends to be more creative because they cut short everything, but it's sometimes dangerous as well. You need creativity to excel. Being a book-worm cannot let you lead a perfect life and job or whatsoever. Delay gratification         Keeping a small budget enables you to manage your finances in an effective way...

Why C++, when python is much easier?

Python is the easiest programming language to date because its syntax is simple to learn and understand, but why is there a need to learn C++? C++ is a mid-level language as it was developed in 1979 after C. C++ is an extended version of C, where ' ++ ' is an increment.  C++, being close to the hardware of the computer, is irreplaceable. It is highly in demand than any other language. You don't need to learn C if you want to learn C++. You can understand the architecture of the computer hardware. It is the most widely used language for game development, applications development, and rendering engines. Languages- Pixabay Python can be used like an object-oriented language but C++ is much more versatile and powerful. Moreover, the main thing which matters is the logic of the program. The logic in both of these languages depends upon the programmer. Let's see the difference between the languages with an example. Python- Pixabay Writing Hello Wor...

Secularism everywhere

     The increased rate of secularism in Pakistan is deviating many from their right path. Pakistan is not a secular state, rather it has an Islamic ideology and is known as 'The Islamic Republic of Pakistan'. Even the so-called 'Muftis"(Recognized scholars), nowadays, are offering degrees in the favor of interest policies. When we have our holy book Quran and Allah says in the Quran:      “O ye who believe! fear Allah and give up what remains of your demand for usury, if ye are indeed believers. If ye do it not, take notice of war from Allah and His Messenger.” (al-Baqara 278-279)       It is clear from the verses mentioned above, that devouring usury (interest), is a war against Allah and his Messenger Muhammad (S.A.W.W). Now if anyone, even a Mufti, says that usury is 'Halal' ( Permissible) in Islam, he is truly misguided and misguiding others as well.  The rise of the secularism       People, even of th...

Imran Khan sends best wishes and prayers to the victims of flood in Kerala, India

        Imran Khan is the most different prime minister of Pakistan, has always shown patriotism for his motherland, love, and affection to the poor and needy. Lamenting on what has happened in Kerala, India, Imran Khan tweeted that he and his countrymen send their best wishes and prayers for the victims of the flood and they might provide the humanitarian assistance if needed.  Imran Khan's tweet . Imran Khan- By Heinrich Böll Stiftung from Berlin, Deutschland        445 deaths were estimated in the flood, 15 people were missing and almost a million evacuated. The property damage was estimated to be the US $3 billion. 35 out of 54 dams were opened for the first time in Indian history. All 14 districts of the Kerala state were in a state of red alert. The Indian government declared it the Level 3 Calamity, Calamity of severe nature. The capacity of dams was full and overflowed. Flood- Pixabay         It w...

Th holocaust and Holland's Geert Wilders

      Talking about the founder of Dutch anti-Islam party, Party of Freedom ( Partij voor de Vrijheid – PVV), Geert Wilders, who is holding Prophet Muhammad (S.A.W.W) cartoon competition has provoked violent responses all across the globe. He has banned every single mosque and Quran in the Netherlands. He has banned all the Muslim immigrants as well. His criticism on Quran and on Islam has made him famous.  Geert Wilders- Wikimedia              He says, "I don't hate Muslims, I hate Islam". It doesn't make any sense, you hate a religion and expect the followers of that particular religion will like you. Somebody, please call a psychiatrist, the patient needs some help with his mentality          I strongly condemn the blasphemy of our beloved prophet (S.A.W.W). Scrolling down the Social Media, I came across the people talking about the Holocaust and violently responding to the foolish act of...