app store rating using switch

 #include<stdio.h>

#include<math.h>

#include<stdbool.h>


int main(){

    int  rating ;

    printf(" enter your rating : ");

    scanf("%d", &rating);

    switch (rating){

        case 1:

        printf( " you have given %d stars ", rating );

        break;

        case 2:

        printf( " you have given %d stars ", rating );

         break;

        case 3:

        printf( " you have given %d stars ", rating ); 

        break;

        case 4:

        printf( " you have given %d stars ", rating );

         break;

        case 5:

        printf( " you have given %d stars ", rating );

         break;

        

    }

    

   


  

  

    

    

   

   

    

    return 0;

}


Comments

Popular posts from this blog

Sum of Even Numbers till N

Find the Runner-Up Score!

Print All Substrings