top of page
Blog: Blog2

IF CONDITON

  • Writer: Michael Felix
    Michael Felix
  • Dec 18, 2018
  • 1 min read

An if structure is formed from an if statement and is often used to select a single condition. If the selected process is fulfilled or true, then the statements in the if block will be processed and worked on


if(condition) 
{     
If the condition is true then this section is executed     
If the value condition is false then this part is not executed 
} 

Example

#include <stdio.h>
int main(){
    float score;
    printf("Enter Your Score : ");
    scanf("%f", &score);
    if(score > 70 && score<=100){
        printf("PASS !!\n");
    }
    else{
        printf("NOT PASS !!\n");
    }
 return 0;
}
 
 
 

Recent Posts

See All
Struct

Struct is a formed data type that contains a collection of variables that are in the same name and are related to one another. In...

 
 
 
POINTER

A pointer is a variable that points to another variable memory address. A pointer does not contain a data value as well as an ordinary...

 
 
 
Array

An array is a collection of data values ​​of the same type in a certain order that uses the same name. According to its dimensions,...

 
 
 

Comments


  • instagram
  • generic-social-link

©2018 by systemnotfound. Proudly created with Wix.com

bottom of page