├── Text1.c ├── Text5.c ├── addition and subtraction.c ├── addition sub mul div..c ├── area of the circle.c ├── array.c ├── calculator.c ├── changing character.c ├── circumfernce.c ├── colour.c ├── colur shoice.c ├── do.c ├── e12.c ├── feet inches miles..c ├── feet inches miles.c ├── go to error.c ├── grade.c ├── inter chNGE.c ├── jd.c ├── leap year,month ,yet.c ├── leap year.c ├── loop table.c ├── mark avg.c ├── marklist.c ├── marklist.hh.c ├── marksheet.c ├── max.c ├── multiplicatiion table.c ├── multiplication.c ├── p.c ├── parr.c ├── pass or fail..c ├── pattern 2.c ├── pattern 3.c ├── pnr.c ├── pol.c ├── pon.c ├── poul.c ├── preority.c ├── series.c ├── series1.c ├── sum of the digit.c ├── sum srray.c ├── swap.c ├── swapnthe value without changing the third value.c ├── swith case.c ├── total.c ├── tsa.c ├── volume of the circle.c └── vote process.c /Text1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | main() 4 | { 5 | int a,b; 6 | printf("Enter the valu a:"); 7 | scanf("%d",&a); 8 | printf("Enter the value of "); 9 | scanf("%d",&b); 10 | printf("The addition ofth tw numbe%d\tin\n",a+b); 11 | printf("The subtractionof the tw number id %d\n\n",a-b); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /Text5.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int a,b,t; 5 | printf("Enter two number:"); 6 | scanf("%d %d",&a,&b); 7 | printf("before exchange the number are :%d %d\n",a,b); 8 | t=a; 9 | a=b; 10 | b=t; 11 | printf("After interchange :the number are :%d %d",a,b); 12 | getch(); 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /addition and subtraction.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | main() 4 | { 5 | int a,b,add,sub; 6 | printf("Enter the first number"); 7 | scanf("%d",&a); 8 | printf("Enter the second number"); 9 | scanf("%d",&b); 10 | add=a+b; 11 | sub=a-b; 12 | printf("\nThe addition value pf the function is:%d",add); 13 | printf("\nThe subtraction value of the function is:%d",sub); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /addition sub mul div..c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | float a,b,c; 5 | int ch; 6 | printf("Enter thetwo nunber:"); 7 | scanf("%f %f",&a,&b); 8 | printf("\n 1.addition"); 9 | printf("\n 2.subtraction"); 10 | printf("\n 3.multiplication"); 11 | printf("\n 4.division"); 12 | printf(" \n enter the choice:"); 13 | scanf("%d",&ch); 14 | switch(ch) 15 | { 16 | case1: 17 | c=a+b; 18 | printf("Addition:%f",c); 19 | break; 20 | case2: 21 | c=a-b; 22 | printf("Subtracton:%f",c); 23 | break; 24 | case3: 25 | c=a*b; 26 | printf("Multiplication:%f",c); 27 | break; 28 | case4: 29 | c=a/b; 30 | printf("Division:%f",c); 31 | break; 32 | default: 33 | printf("your choice is error"); 34 | break; 35 | 36 | } 37 | getch(); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /area of the circle.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #define pi 3.14 4 | main() 5 | { 6 | int r,area; 7 | printf("Enter the radius:"); 8 | scanf("%d",&r); 9 | area=pi*r*r; 10 | printf("the area of the circle is %d",area); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /array.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | main() 4 | { 5 | int i,n,sum,a[10]; 6 | i=sum=0; 7 | printf("Enter the no of data:"); 8 | scanf("%d",&n); 9 | printf("\n enter the data:\n"); 10 | for(i=0;i 2 | #include 3 | main() 4 | { 5 | int a,b,sum,sub,mul,div ,mod; 6 | printf("Enter the a"); 7 | scanf("%d",&a); 8 | printf("Enter thee b:"); 9 | scanf("%d",&b); 10 | sum=a+b; 11 | sub=a-b; 12 | mul=a*b; 13 | div=a/b; 14 | mod=a%b; 15 | printf("Addition%d",sum); 16 | printf("Subtraction:%d",sub); 17 | printf("Multiplication%d",mul); 18 | printf("division%d",div); 19 | printf("modulos%d",mod); 20 | getch(); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /changing character.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | main() 4 | { 5 | char m[10]; 6 | printf("Enter the string:"); 7 | scanf("%d",&m); 8 | clrscr(); 9 | printf("the entered string%s\n\n",m); 10 | getch(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /circumfernce.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #define pi 3.14 4 | main() 5 | 6 | { 7 | int r,h,area,circumference; 8 | printf("enter the radius:"); 9 | scanf("%d",&r); 10 | printf("Entter the height:"); 11 | scanf("%d",&h); 12 | area=pi*r*r; 13 | circumference=2*pi*r; 14 | printf("\nthe area of th circle %d",area); 15 | printf("\nthe circumference of the circle:%d",circumference); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /colour.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | main() 4 | { 5 | char choice; 6 | printf("Enter the choice:"); 7 | getts(choice); 8 | if(choice >='a' && choice <='z') 9 | choice=choice-32; 10 | switch(choice); 11 | { 12 | case 'R': 13 | printf("\n red"); 14 | break; 15 | case 'W': 16 | printf("\n white"); 17 | break; 18 | case 'Y': 19 | printf("\n Yellow"); 20 | break; 21 | case 'B': 22 | printf("\n Black"); 23 | break; 24 | default: 25 | printf("Errror"); 26 | 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /colur shoice.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | char choice; 5 | printf("Enter the choice"); 6 | choice=getchar(); 7 | if(choice>='a' && choice<='z'); 8 | 9 | choice=choice-32; 10 | switch(choice) 11 | { 12 | case'R': 13 | printf("\n RED"); 14 | break; 15 | case'W': 16 | printf("\n WHITE"); 17 | break; 18 | case'B': 19 | printf("\n BLUE"); 20 | break; 21 | default: 22 | printf("\n ERROR"); 23 | break; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /do.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int i; 5 | printf("Enter the number:"); 6 | scanf("%d",&i); 7 | switch(i) 8 | { 9 | case 1: 10 | printf("Do"); 11 | case 2: 12 | printf("what"); 13 | case 3: 14 | printf("i"); 15 | case 4: 16 | printf("say"); 17 | case default: 18 | printf("That i have a good day"); 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /e12.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | main() 5 | { 6 | int rno,name,m1,m2,m3,m4,m5,tot,avg,res; 7 | printf("Enter the rno:"); 8 | scanf("%d",&rno); 9 | printf("Enter the name;"); 10 | scanf("%s",&name); 11 | printf("Enter the mark:"); 12 | scanf("%d %d %d %d %d",&m1,&m2,&m3,&m4,&m5); 13 | 14 | tot=0; 15 | avg=0; 16 | tot=m1+m2+m3+m4+m5; 17 | avg=tot/5; 18 | res; 19 | if(tot>=200) 20 | printf("PASS"); 21 | else 22 | printf("FAIL"); 23 | printf("\nThe total mark of the student is:%d",tot); 24 | printf("\nThe average mark of thhe student is:%d",avg); 25 | printf("\nThe result of the student :%s",res); 26 | } 27 | 28 | -------------------------------------------------------------------------------- /feet inches miles..c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int feet; 5 | long inches; 6 | float miles; 7 | printf("\n enter feet:"); 8 | scanf("\n %d",feet); 9 | inches=feet*121; 10 | miles=(float)feet/5280; 11 | printf("\n %d feets in equql to %1d inches",feet,inches); 12 | printf("\n and %f miles",miles); 13 | getch(); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /feet inches miles.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int feet; 5 | long inches; 6 | float miles; 7 | printf("\n enter feet:"); 8 | scanf("\n %d",feet); 9 | inches=feet*121; 10 | miles=(float)feet/5280; 11 | printf("\n %d feets in equql to %1d inches",feet,inches); 12 | printf("\n and %f miles",miles); 13 | getch(); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /go to error.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int x,y; 5 | x=16; 6 | y=12; 7 | if(x==y) 8 | x++; 9 | else 10 | goto ERROR; 11 | printf("Fatal error,existing\n"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /grade.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int m1,m2,m3; 5 | float avg; 6 | printf("Enter 3 marks:"); 7 | scanf("%d %d %d ",&m1,&m2,&m3); 8 | avg=(m1+m2+m3)/3; 9 | printf("\n average=%1f",avg); 10 | if(avg>=60) 11 | { 12 | if(avg>=80) 13 | printf("A grade"); 14 | else 15 | printf("B grade"); 16 | } 17 | else 18 | { 19 | if(avg>=0) 20 | printf("C grade"); 21 | else 22 | printf("Fail"); 23 | } 24 | getch(); 25 | } 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | -------------------------------------------------------------------------------- /inter chNGE.c: -------------------------------------------------------------------------------- 1 | #include> 3 | main() 4 | { 5 | int a,b,t; 6 | printf("Enter two number:"); 7 | scanf("%d %d",&a,&b); 8 | printf("before exchange the number are :%d %d\n"a,b); 9 | t=a; 10 | a=b; 11 | b=a; 12 | printf("After interchange :the number are :%d %d",a,b); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /jd.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | main() 4 | { 5 | int a,b,sum,sub,mul,div ,mod; 6 | printf("Enter the a"); 7 | scanf("%d",&a); 8 | printf("Enter thee b:"); 9 | scanf("%d",&b); 10 | sum=a+b; 11 | sub=a-b; 12 | mul=a*b; 13 | div=a/b; 14 | mod=a%b; 15 | printf("Addition%d",sum); 16 | printf("Subtraction:%d",sub); 17 | printf("Multiplication%d",mul); 18 | printf("division%d",div); 19 | printf("modulos%d",mod); 20 | getch(); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /leap year,month ,yet.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int month,year,feb_max; 5 | printf("\n enter month and year:"); 6 | scanf("%d %d",&month,&year); 7 | if(month == 2) 8 | { 9 | printf("\n month is febrary"); 10 | if((year % 4)==0) 11 | { 12 | printf("\n leap year"); 13 | feb_max=29; 14 | } 15 | else 16 | { 17 | printf("\n not a leap year"); 18 | feb_max=28; 19 | } 20 | printf("\n max day in this monthh :%d",feb_max); 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /leap year.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int y; 5 | printf("Enter the year:"); 6 | scanf("%d",&y); 7 | if(y%4==0) 8 | printf("it is year"); 9 | else 10 | printf("It is not leap year"); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /loop table.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int i,j,n; 5 | printf("Enter the n:"); 6 | scanf("%d",&n); 7 | for(i=0;i 2 | #include 3 | main() 4 | { 5 | int m1,m2,m3,m4,m5; 6 | float avg; 7 | printf("enter the five mark:"); 8 | scanf("%d %d %d %d %d",&m1,&m2,&m3,&m4,&m5); 9 | avg=(m1+m2+m3+m4+m5)/5; 10 | printf("average=%1f \n",avg); 11 | if(avg>=90) 12 | printf("A grade"); 13 | if(avg>=80) 14 | printf("B grade"); 15 | if(avg>=70) 16 | printf("C grade"); 17 | if (avg>=60) 18 | printf("D grade"); 19 | else 20 | printf("Fail"); 21 | } 22 | getch(); 23 | } 24 | 25 | -------------------------------------------------------------------------------- /marklist.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | main() 4 | { 5 | int m1,m2,m3,m4,m5,m6,total; 6 | float avg; 7 | printf("enter the six mark:"); 8 | scanf("%d %d %d %d %d %d",&m1,&m2,&m3,&m4,&m5,&m6); 9 | avg=(m1+m2+m3+m4+m5+m6)/6; 10 | total=m1+m2+m3+m4+m5+m6; 11 | printf("The total mark is:%d",total); 12 | printf("average=%1f \n",avg); 13 | if(avg>=90) 14 | printf("A grade"); 15 | if(avg>=80) 16 | printf("B grade"); 17 | if(avg>=70) 18 | printf("C grade"); 19 | if (avg>=60) 20 | printf("D grade"); 21 | else 22 | printf("Fail"); 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /marklist.hh.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | struct tag 5 | { 6 | int rno; 7 | char name[50]; 8 | int m[5]; 9 | }s[20]; 10 | 11 | myline() 12 | { 13 | int i,n,j,tot,avg,res; 14 | for(i=0;i 2 | #include 3 | main() 4 | { 5 | int t,e,m,s,ss,total,avg,result; 6 | printf("Enter th tamilmark:"); 7 | scanf("%d",&t); 8 | printf("Enter the english mark:"); 9 | scanf("%d",&e); 10 | printf("Enter the maths mak:"); 11 | scanf("%d",&m); 12 | printf("EMter the science mrk:"); 13 | scanf("%d",&s); 14 | printf("Entter the social sciece mark:"); 15 | scanf("%d",&ss); 16 | total=0; 17 | avg=0; 18 | result=0; 19 | total=t+e+m+s+ss; 20 | avg=(t+e+m+s+ss)/5; 21 | result; 22 | if (result>=35) 23 | printf("pass"); 24 | else 25 | printf("Fail"); 26 | 27 | printf("The total mark of the student is:%d",total); 28 | printf("the average mark of th student is:%d",avg); 29 | printf("The result of the studenis :%d",result); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /max.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | main() 4 | { 5 | char name,place; 6 | printf("enter the name:"); 7 | scanf("%c",&name); 8 | printf("Enter the place"); 9 | scanf("%c",&place); 10 | printf("i am%c\n",name); 11 | printf("i am coming from %c\n",place); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /multiplicatiion table.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | main() 4 | { 5 | int i,n,p; 6 | for(i=0;i<=20;i++); 7 | printf("Enter the no of the table:"); 8 | scanf("%d",&n); 9 | i=1; 10 | for(i=1;i<=20;i++) 11 | { 12 | p=n*i; 13 | printf("\n %d x %d =%d",i,n,p); 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /multiplication.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int num,absolute; 5 | printf("Enter the unsigned number:"); 6 | scanf("%d",&num); 7 | absolute=(num<0)?-num:num; 8 | printf("Absolute value=%d \n",absolute); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /p.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int i,j,n; 5 | printf("Enter the n:"); 6 | scanf("%d",&n); 7 | for(i=1;i 2 | main() 3 | { 4 | int i,j,n; 5 | printf("Enter the n:"); 6 | scanf("%d",&n); 7 | for(i=0;i 2 | main() 3 | { 4 | int m1,m2,m3; 5 | float avg; 6 | printf("Enter 3 marks:"); 7 | scanf("%d %d %d ",&m1,&m2,&m3); 8 | avg=(m1+m2+m3)/3; 9 | printf("average=%1f\n",avg); 10 | if(avg>=60) 11 | { 12 | if(avg>=80) 13 | printf("A grade"); 14 | else 15 | printf("B grade"); 16 | } 17 | else 18 | { 19 | if(avg>=40) 20 | printf("C grade"); 21 | else 22 | printf("Fail"); 23 | } 24 | getch(); 25 | } 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | -------------------------------------------------------------------------------- /pattern 2.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int i,j,n; 5 | printf("enter the n:"); 6 | scanf("%d",&n); 7 | for(i=0;i 2 | main() 3 | { 4 | int i,j,n; 5 | printf("Enter the n:"); 6 | scanf("%d",&n); 7 | for(i=1;i 2 | #include 3 | main() 4 | { 5 | long int p; 6 | int n; 7 | float r,SI; 8 | printf("\nEnter priciple amount:"); 9 | scanf("%d",&p); 10 | printf("\nenter rate of amount:"); 11 | scanf("%f6",&r); 12 | printf("\nEnter number of year"); 13 | scanf("%d",&n); 14 | SI=p*n*r/100; 15 | printf("\n\n interested amount %6.2fRs",SI); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /pol.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int i,j,n; 5 | printf("Enter the n:"); 6 | scanf("%d",&n); 7 | for(i=0;i 2 | main() 3 | { 4 | int i,j,n; 5 | printf("Enter the n:"); 6 | scanf("%d",&n); 7 | for(i=0;i 2 | main() 3 | { 4 | int i,j,n,s; 5 | printf("enter the n:"); 6 | scanf("%d",&n); 7 | for(i=0;i 2 | main() 3 | { 4 | int x; 5 | 6 | x=5+6*4; 7 | 8 | printf("The value x is %d",x); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /series.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int l,n; 5 | print("Enter n"); 6 | scanf("%d",&n); 7 | for(int i=-n;i<=n;i++) 8 | { 9 | if(i<0) 10 | l=-i; 11 | else 12 | l=+i; 13 | 14 | for(int s=0;s 2 | #include 3 | main() 4 | { 5 | int i,j,k,n=0; 6 | scanf("%d",&n); 7 | for(i=1;i<=n;i++) 8 | { 9 | for(k=0;k<=(50-i);k++) 10 | printf(""); 11 | for(j=1;j<=(2*i-1);k++) 12 | printf("%d",i); 13 | printf("\n"); 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /sum of the digit.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | while(n>0) 4 | { 5 | rem=(n%10); 6 | sum=sum+rem; 7 | n/=10; 8 | } 9 | printf("the sum of digit is:%d",sum); 10 | } 11 | 12 | -------------------------------------------------------------------------------- /sum srray.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | main() 4 | { 5 | int i,n,sum,a[10]; 6 | i=sum=0; 7 | printf("Enter the no of data:"); 8 | scanf("%d",&n); 9 | printf("\n enter the data:\n"); 10 | for(i=0;i 2 | #include 3 | main() 4 | { 5 | int temp,a,b; 6 | printf("Enter a:"); 7 | scanf("%d",&a); 8 | printf("Enter b:"); 9 | scanf("%d",&b); 10 | temp=a; 11 | a=b; 12 | b=temp; 13 | printf("the interchange of a is%d\n:",a); 14 | printf("the interchange of b is%d\n:",b); 15 | getch(); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /swapnthe value without changing the third value.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int a,b; 5 | printf("A="); 6 | scanf("%d",&a); 7 | printf("B:",&b); 8 | scanf("%d",&b); 9 | a=a+b; 10 | b=a-b; 11 | a=a-b; 12 | printf("\n\nA=%d \tb=%d",a,b); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /swith case.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int choice, n1,n2,t; 5 | printf("1.add,2.sub"); 6 | printf("Enter the choice:"); 7 | scanf("%d",&choice); 8 | printf("Enter the n1:"); 9 | scanf("%d",&n1); 10 | printf("Enter the n2:"); 11 | scanf("%d",&n2); 12 | switch(choice) 13 | { 14 | case1: 15 | t=n1+n2; 16 | printf("The addition ofthe numberis :%d",n1); 17 | break; 18 | case2 : 19 | t=n1-n2; 20 | printf("The subtracttion of th numberi s :%d",n2); 21 | break; 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /total.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | main() 4 | { 5 | int i,n,sum[10],a; 6 | int max,min,range; 7 | float avg; 8 | i=sum=0; 9 | printf("Enter the no of data:"); 10 | scanf("%d",&n); 11 | printf("Enter the data:"); 12 | for(i=0;ia[i]) 19 | min=a[i]; 20 | if(max 2 | #include 3 | #define pi 3.14 4 | main() 5 | { 6 | int tsa,vol,l,b,h,lb,bh,hl; 7 | printf("Enter the length:"); 8 | scanf("%d",&l); 9 | printf("Enter the breadth :"); 10 | scanf("%d",&b); 11 | printf("Enter the height:"); 12 | scanf("%d",&h); 13 | tsa=(2*(lb+bh+hl)); 14 | vol=l*b*h; 15 | printf("the tsa of the circle is %d",tsa); 16 | printf("the volume of the circle is%d",vol); 17 | } 18 | 19 | -------------------------------------------------------------------------------- /volume of the circle.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #define pi 3.14 4 | main() 5 | { 6 | int r,h,volume; 7 | printf("enter the radius:"); 8 | scanf("%d ",&r); 9 | printf("Enter the height:"); 10 | scanf("%d",&h); 11 | volume=pi*r*r*h; 12 | printf("Volume of the circle is %d",volume); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /vote process.c: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int name,age; 5 | printf("Enter the name:"); 6 | scanf("%s",&name); 7 | printf("Enter the age:"); 8 | scanf("%d",&age); 9 | if(age>=18) 10 | printf("that the person is eligibility to vote as inndian citizen"); 11 | else 12 | printf("the person not have eligibility to vote as indian citizen"); 13 | } 14 | 15 | --------------------------------------------------------------------------------