Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

PROGRAM THAT PROVIDES THE USE OF SHORTHAND OPERATOR *=

Posted By: Isla Hughes     Category: C Programming     Views: 18024

WRITE A PROGRAM THAT PROVIDES THE USE OF SHORTHAND OPERATOR *=.

Code for PROGRAM THAT PROVIDES THE USE OF SHORTHAND OPERATOR *= in C Programming

#define    N   100                                          
   #define    A   2                                            
                                                               
   main()                                                      
   {                                                           
       int  a;                                                 
                                                               
       a  =  A;                                                
       while( a < N )                                          
       {                                                       
            printf("%d\n", a);                                 
            a *= a;                                            
       }                                                       
   }                                                           
                                                            
Output                                                      
                                                               
   2                                                           
   4                                                           
   16                                       
  
Share: 


Didn't find what you were looking for? Find more on PROGRAM THAT PROVIDES THE USE OF SHORTHAND OPERATOR *= Or get search suggestion and latest updates.

Isla Hughes
Isla Hughes author of PROGRAM THAT PROVIDES THE USE OF SHORTHAND OPERATOR *= is from London, United Kingdom.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!