If statement is use when it gives only true result it is simple statement to execute any program.
syntax
if(condition)
statement
statement
Program
#include<iostream>
using namespace std;
int main(){
int marks;
cout<<"Please Enter Yours Marks";
cin>>marks;
if(marks>=40){
cout<<"Congratulation! You have Passed ";
}
}
Must visit to my Youtube Channel for more lecture and give your feedback in the comment section.
Follow me on Facebook page.
Thanks For visiting Here!!