Posts

Showing posts with the label PROGRAM

Trangle program

trangle program 2 #include <stdio.h> #include <conio.h> void   main () {       int  i,j,r,k= 1 ;       printf ( "enter the range " );       scanf ( "%d" ,&r);       printf ( "floyd's trangle  \n\n " );       for  (i= 1 ;i<=r;i++)      {           for (j= 1 ;j<=i;j++;k++)           printf ( "%d" ,k);           printf ( " \n " );      }  return   0 ; }

program 1

                                         program 1 \*add two number *\ #include<stdio.h> main() { int a,b,c; printf("enter the number"); scanf("%d%d",&a,&b); c=a+b; printf("sum of number is %d",c); }              if used turbo c/c++ necessary use getch(); hold screen . output if a=10 and b=20 sum of number is 30            trangle program II #include <stdio.h> #include <conio.h> void   main () {       int  i,j,r,k= 1 ;       printf ( "enter the range " );       scanf ( "%d" ,&r);       printf ( "floyd's trangle  \n\n " );       for  (i= 1 ;i<=r;i++)     ...

computer science

Image