Posts

Showing posts with the label c language

CODE FOR ADDING TWO NUMBERS

 CODE FOR ADDING TWO NUMBERS  OUTPUT int   main () {      //simple code of adding 2 numbers      int   a ,  b ;      printf ( "Enter the first number you want to add:- \n " );      scanf ( "%d" , & a );      printf ( "Enter the second number you want to add:- \n " );      scanf ( "%d" , & b );      printf ( "The required sum is :- %d \n " ,  a  +  b );      return   0 ; } INPUT Enter the first number you want to add:- 100 Enter the second number you want to add:- 100 The required sum is :- 200

BASIC CODE FOR PROGRAMMING BEGINNNERS

  FIRST CODE  output #include   <stdio.h> int   main () {      //first program:just printing any statement.      printf ( "Nandini is a good girl." );      //we can add space acco. to our choices       // semicolon is a must .      //we can add anything between the inverted commas.      return   0 ; } input Nandini is a good girl.