Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Online C compiler to run C program online
- #include <stdio.h>
- int main() {
- // Write C code here
- // printf("Hello world");
- // if(a>b){
- // printf("a>b");
- // }
- // Simple If Statement
- if(condition){
- // True BLock
- }
- // If else Statement
- if(conditon){
- // True Block
- }else{
- // False Block
- }
- // Nested if else statement
- if(condition1){
- // True block of outer if
- if(condition2){
- // True block of inner if
- }else{
- // False block of inner if
- }
- }else{
- // False block of outer if
- }
- // else if ladder statement
- if(conditon1){
- // 1st if True Block
- }else if(condition2){
- // 2nd if True Block
- }else if(condition3){
- // 3rd if True Block
- }else{
- // last False Block
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement