If Else If ladder statement in C++ Programming Language

Image
 If Else If ladder statement in C++ Programming Language In programming languages we have conditional statements or decision making statements that we can use in order to make decisions among multiple conditions. Today we are going to cover a simple conditional statement which is known as if-else-if ladder statement in C++ programming language.  In C++ programming language the if-esle-if ladder statement is a multi-way decision-making construct, it allows us to test different  conditions in sequence, and executing the block of code associated with the first condition that evaluates to be true. Syntax of if-else-if ladder statement in C++ programming language if(condition1) {     //code to be executed if condition1 is true     } else if(condition2) {     //code to be executed if condition2 is true     }     else if(condition3) {     //code t...

How to run c project in visual studio community 2022

 How to Run C project in Visual Studio Community 2022

Many people think we cannot write c code in the visual studio community. but this is completely not true, yes we can create a C file and run C code in Visual Studio 2022 let us see how we can achieve it.






1) Open Visual Studio 2022 

First of all, we are going to open Visual Studio 2022.


2) creating a new project 

Then we are going to create a new project by clicking create new project button.



3) choosing a project template:

Create a new project window that will appear in front of you. From this window select an empty project template with C++ symbol on it. Then push the next button.







4) configure your project 

A new window will appear in front of you with the heading Configure your new project. In this window, you can select your project and solution name. And also the location of your project. then click the Create button.






5) New project created:

On clicking the create button a C++ project is going to be created in front of you. At this point go to view the top menu bar options and click on Solution Explorer.




6) Open solution explorer:

On opening the solution explorer right right-click on the source files folder, go to the add menu, and with the Add menu select New item.






7) Add new item window:

on clicking new item, add new item window will appear in front of you. From this window select visual c++ on the left panel then select c++ file(.cpp) and name the file according to your choice but remember the most important point,  




change the file name extension from source.cpp to source.c to create a c file.






Click the Add button.





On this file with source.c extension you can write a C program. Write the given code it will print Hello World on the console screen.



8) Congratulations you have achieved the goal.

Below is a description video to create a C++ project and print the Hello World program in C programming format.


Comments

Popular posts from this blog

How To Write Hello World Program In C++ Programming Language

if and if-else statement in C programming language