scroll down for each of my assignment
Temperature conversion
link to program: https://replit.com/@RahmatBashardos/RahmatullahTempConversion?v=1
rahmatullahtempconversion.zip |
Sample Run
sh -c make -s
./main
what is your name: rahmat
What type of conversion do you want to do (c for celsius, f for farenheit, k for kelvin): c
Please enter a temperature in Celcius (-100 to 100 degrees): 50.5
50.5F converts to 82.5 degrees Farenheit or 323.65 degrees Kelvin
Do you want to do another conversion (1 for yes 2 for no):1
What type of conversion do you want to do (c for celsius, f for farenheit, k for kelvin): f
Please enter a temperature in Farenheit (-50 to 150 degrees): 20.5
20.5F converts to -6.38889 degrees Centigrade or 459.67 degrees Kelvin
Do you want to do another conversion (1 for yes 2 for no):1
What type of conversion do you want to do (c for celsius, f for farenheit, k for kelvin): k
Please enter a temperature in kelvin (-200 to 500 degrees): 30.5
30.5 Kelvin converts to-242.65Celcius or -404.77 degrees Farenheit
Do you want to do another conversion (1 for yes 2 for no):2
Thankyou!
./main
what is your name: rahmat
What type of conversion do you want to do (c for celsius, f for farenheit, k for kelvin): c
Please enter a temperature in Celcius (-100 to 100 degrees): 50.5
50.5F converts to 82.5 degrees Farenheit or 323.65 degrees Kelvin
Do you want to do another conversion (1 for yes 2 for no):1
What type of conversion do you want to do (c for celsius, f for farenheit, k for kelvin): f
Please enter a temperature in Farenheit (-50 to 150 degrees): 20.5
20.5F converts to -6.38889 degrees Centigrade or 459.67 degrees Kelvin
Do you want to do another conversion (1 for yes 2 for no):1
What type of conversion do you want to do (c for celsius, f for farenheit, k for kelvin): k
Please enter a temperature in kelvin (-200 to 500 degrees): 30.5
30.5 Kelvin converts to-242.65Celcius or -404.77 degrees Farenheit
Do you want to do another conversion (1 for yes 2 for no):2
Thankyou!
Marks Program
rahmatullahmarks-program__2_.zip |
Sample Run
sh -c make -s
./main
Hey what is your name: Rahmat
Mark in Math
89
Mark in English
80
Mark in Computer
86
Mark in Chemistry
59
Your average is 78.5%
Do you want to run program again (1 for yes 2 for no):1
Hey what is your name: Rahmat
Mark in Math
59
Mark in English
89
Mark in Computer
95
Mark in Chemistry
78
Your average is 80.25%
Do you want to run program again (1 for yes 2 for no):2
Thankyou!
./main
Hey what is your name: Rahmat
Mark in Math
89
Mark in English
80
Mark in Computer
86
Mark in Chemistry
59
Your average is 78.5%
Do you want to run program again (1 for yes 2 for no):1
Hey what is your name: Rahmat
Mark in Math
59
Mark in English
89
Mark in Computer
95
Mark in Chemistry
78
Your average is 80.25%
Do you want to run program again (1 for yes 2 for no):2
Thankyou!
Loops Mania
link to program:replit.com/@RahmatBashardos/RahmatLoops-Mania?v=1
rahmatloops-mania.zip |
Sample Run
sh -c make -s
./main
No.1 Enter anumber between -4000 and 4000: 44444
Error.Follow instructions!
No.1 Enter anumber between -4000 and 4000: 5665
Error.Follow instructions!
No.1 Enter anumber between -4000 and 4000: 566
No.2 Enter anumber between -4000 and 4000: 5555
Error.Follow instructions!
No.2 Enter anumber between -4000 and 4000: 24
what nuber between 1 and 100 will you counting by: 7
566 559 552 545 538 531 524 517 510 503 496 489 482 475468 461 454 447 440 433 426 419 412 405 398 391 384 377370 363 356 349 342 335 328 321 314 307 300 293 286 279272 265 258 251 244 237 230 223 216 209 202 195 188 181174 167 160 153 146 139 132 125 118 111 104 97 90 83 76 69 62 55 48 41 34 27
Do you want to run program again (1 for yes 2 for no):
./main
No.1 Enter anumber between -4000 and 4000: 44444
Error.Follow instructions!
No.1 Enter anumber between -4000 and 4000: 5665
Error.Follow instructions!
No.1 Enter anumber between -4000 and 4000: 566
No.2 Enter anumber between -4000 and 4000: 5555
Error.Follow instructions!
No.2 Enter anumber between -4000 and 4000: 24
what nuber between 1 and 100 will you counting by: 7
566 559 552 545 538 531 524 517 510 503 496 489 482 475468 461 454 447 440 433 426 419 412 405 398 391 384 377370 363 356 349 342 335 328 321 314 307 300 293 286 279272 265 258 251 244 237 230 223 216 209 202 195 188 181174 167 160 153 146 139 132 125 118 111 104 97 90 83 76 69 62 55 48 41 34 27
Do you want to run program again (1 for yes 2 for no):
Loops galore
link to program:https//1replit.com/@RahmatBashardos/Rahmatloopsgalore?v=1
rahmatloopsgalore.zip |
Sample Run
sh -c make -s
./main
Welcome to my for loop assignment
Question 1: For loop to display the numbers 1 to 25:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
*****************************************
Question 2: For loop to display the numbers 2 to 8:
2 3 4 5 6 7 8
*****************************************
Question 3: For loop to display the numbers 50 to 100:
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
*****************************************
Question 4: For loop to display the numbers 1 to 75 by 4:
1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73
*****************************************
Question 5: For loop to display the numbers 36 to 600 by 15:
36 51 66 81 96 111 126 141 156 171 186 201 216 231 246 261 276 291 306 321 336 351 366 381 396 411 426 441 456 471 486 501 516 531 546 561 576 591
*****************************************
Question 6: For loop to display the numbers -25 to 105 by 7:
-25 -18 -11 -4 3 10 17 24 31 38 45 52 59 66 73 80 87 94 101
*****************************************
Question 7: For loop to display the numbers -350 to 350 by 8:
-350 -342 -334 -326 -318 -310 -302 -294 -286 -278 -270 -262 -254 -246 -238 -230 -222 -214 -206 -198 -190 -182 -174 -166 -158 -150 -142 -134 -126 -118 -110-102 -94 -86 -78 -70 -62 -54 -46 -38 -30 -22 -14 -6 2 10 18 26 34 42 50 58 66 74 82 90 98 106 114 122 130 138 146 154 162 170 178 186 194 202 210 218 226 234 242 250 258 266 274 282 290 298 306 314 322 330 338 346
*****************************************
Question 8: For loop to display the numbers 100 to 1 by 1:
100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
*****************************************
Question 9: For loop to display the numbers 1000 to 700 by 5:
1000 995 990 985 980 975 970 965 960 955 950 945 940 935 930 925 920 915 910 905 900 895 890 885 880 875 870 865 860 855 850 845 840 835 830 825 820 815 810 805 800 795 790 785 780 775 770 765 760 755 750 745 740 735 730 725 720 715 710 705 700
*****************************************
Question 10: For loop to display the numbers 180 to -50 by 6:
180 174 168 162 156 150 144 138 132 126 120 114 108 102 96 90 84 78 72 66 60 54 48 42 36 30 24 18 12 60 -6 -12 -18 -24 -30 -36 -42 -48
*****************************************
Question 11: For loop to display the numbers -30 to -600 by 25:
-30 -55 -80 -105 -130 -155 -180 -205 -230 -255 -280 -305 -330 -355 -380 -405 -430 -455 -480 -505 -530 -555 -580
*****************************************
Question 12: For loop to display the even numbers between 1 and 200:
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 174 176 178 180 182 184 186 188 190 192 194 196 198 200
*****************************************
Question 13: The odd numbers between 200 and 300 inclusive
201 203 205 207 209 211 213 215 217 219 221 223 225 227 229 231 233 235 237 239 241 243 245 247 249 251 253 255 257 259 261 263 265 267 269 271 273 275 277 279 281 283 285 287 289 291 293 295 297 299
*****************************************
Question 14: The numbers between 1 and 400 that are divisible by 7
7 14 21 28 35 42 49 56 63 70 77 84 91 98 105 112 119 126 133 140 147 154 161 168 175 182 189 196 203 210 217 224 231 238 245 252 259 266 273 280 287 294 301 308 315 322 329 336 343 350 357 364 371 378 385 392 399
*****************************************
Question 15: The numbers between 1 and 500 that are equally divisible by both 6 and 4
12 24 36 48 60 72 84 96 108 120 132 144 156 168 180 192 204 216 228 240 252 264 276 288 300 312 324 336 348 360 372 384 396 408 420 432 444 456 468 480 492
*****************************************
Question 16: Use a loop to create a design using stars (could be a simple triangle or something more complex)
**
****
******
********
**********
************
**************
****************
******************
********************
**********************
************************
**************************
****************************
******************************
********************************
**********************************
************************************
**************************************
****************************************
******************************************
********************************************
**********************************************
************************************************
**************************************************
****************************************************
******************************************************
********************************************************
**********************************************************
************************************************************
**************************************************************
****************************************************************
******************************************************************
********************************************************************
******************************************************************
****************************************************************
**************************************************************
************************************************************
**********************************************************
********************************************************
******************************************************
****************************************************
**************************************************
************************************************
**********************************************
********************************************
******************************************
****************************************
**************************************
************************************
**********************************
********************************
******************************
****************************
**************************
************************
**********************
********************
******************
****************
**************
************
**********
********
******
****
**
./main
Welcome to my for loop assignment
Question 1: For loop to display the numbers 1 to 25:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
*****************************************
Question 2: For loop to display the numbers 2 to 8:
2 3 4 5 6 7 8
*****************************************
Question 3: For loop to display the numbers 50 to 100:
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
*****************************************
Question 4: For loop to display the numbers 1 to 75 by 4:
1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73
*****************************************
Question 5: For loop to display the numbers 36 to 600 by 15:
36 51 66 81 96 111 126 141 156 171 186 201 216 231 246 261 276 291 306 321 336 351 366 381 396 411 426 441 456 471 486 501 516 531 546 561 576 591
*****************************************
Question 6: For loop to display the numbers -25 to 105 by 7:
-25 -18 -11 -4 3 10 17 24 31 38 45 52 59 66 73 80 87 94 101
*****************************************
Question 7: For loop to display the numbers -350 to 350 by 8:
-350 -342 -334 -326 -318 -310 -302 -294 -286 -278 -270 -262 -254 -246 -238 -230 -222 -214 -206 -198 -190 -182 -174 -166 -158 -150 -142 -134 -126 -118 -110-102 -94 -86 -78 -70 -62 -54 -46 -38 -30 -22 -14 -6 2 10 18 26 34 42 50 58 66 74 82 90 98 106 114 122 130 138 146 154 162 170 178 186 194 202 210 218 226 234 242 250 258 266 274 282 290 298 306 314 322 330 338 346
*****************************************
Question 8: For loop to display the numbers 100 to 1 by 1:
100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
*****************************************
Question 9: For loop to display the numbers 1000 to 700 by 5:
1000 995 990 985 980 975 970 965 960 955 950 945 940 935 930 925 920 915 910 905 900 895 890 885 880 875 870 865 860 855 850 845 840 835 830 825 820 815 810 805 800 795 790 785 780 775 770 765 760 755 750 745 740 735 730 725 720 715 710 705 700
*****************************************
Question 10: For loop to display the numbers 180 to -50 by 6:
180 174 168 162 156 150 144 138 132 126 120 114 108 102 96 90 84 78 72 66 60 54 48 42 36 30 24 18 12 60 -6 -12 -18 -24 -30 -36 -42 -48
*****************************************
Question 11: For loop to display the numbers -30 to -600 by 25:
-30 -55 -80 -105 -130 -155 -180 -205 -230 -255 -280 -305 -330 -355 -380 -405 -430 -455 -480 -505 -530 -555 -580
*****************************************
Question 12: For loop to display the even numbers between 1 and 200:
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 174 176 178 180 182 184 186 188 190 192 194 196 198 200
*****************************************
Question 13: The odd numbers between 200 and 300 inclusive
201 203 205 207 209 211 213 215 217 219 221 223 225 227 229 231 233 235 237 239 241 243 245 247 249 251 253 255 257 259 261 263 265 267 269 271 273 275 277 279 281 283 285 287 289 291 293 295 297 299
*****************************************
Question 14: The numbers between 1 and 400 that are divisible by 7
7 14 21 28 35 42 49 56 63 70 77 84 91 98 105 112 119 126 133 140 147 154 161 168 175 182 189 196 203 210 217 224 231 238 245 252 259 266 273 280 287 294 301 308 315 322 329 336 343 350 357 364 371 378 385 392 399
*****************************************
Question 15: The numbers between 1 and 500 that are equally divisible by both 6 and 4
12 24 36 48 60 72 84 96 108 120 132 144 156 168 180 192 204 216 228 240 252 264 276 288 300 312 324 336 348 360 372 384 396 408 420 432 444 456 468 480 492
*****************************************
Question 16: Use a loop to create a design using stars (could be a simple triangle or something more complex)
**
****
******
********
**********
************
**************
****************
******************
********************
**********************
************************
**************************
****************************
******************************
********************************
**********************************
************************************
**************************************
****************************************
******************************************
********************************************
**********************************************
************************************************
**************************************************
****************************************************
******************************************************
********************************************************
**********************************************************
************************************************************
**************************************************************
****************************************************************
******************************************************************
********************************************************************
******************************************************************
****************************************************************
**************************************************************
************************************************************
**********************************************************
********************************************************
******************************************************
****************************************************
**************************************************
************************************************
**********************************************
********************************************
******************************************
****************************************
**************************************
************************************
**********************************
********************************
******************************
****************************
**************************
************************
**********************
********************
******************
****************
**************
************
**********
********
******
****
**
Dice rolling
link to program:https//replit.com/@RahmatBashardos/Rahmatdice?v=1
rahmatdice.zip |
simple to run.
sh -c make -s
./main
how many times do you want to roll the dice? 78
number of rolling a dice 2 5 3 4 6 4 5 6 6 4 2 43 2 2 4 6 6 1 6 1 6 5 5 3 1 34 5 3 6 6 1 2 2 5 4 4 2 1 5 35 1 4 6 4 2 4 2 5 4 6 2 6 2 21 4 4 3 1 2 1 6 3 5 1 6 4 2 46 6 5 2 3 6
the number of 1s;0 = 0%
the number of 2s;0 = 0%
the number of 3s;0 = 0%
the number of 4s;0 = 0%
the number of 5s;0 = 0%
the number of 6s;1 = 1.28205%
do you want to run the program agin? (1 for yes, 2 for No)
./main
how many times do you want to roll the dice? 78
number of rolling a dice 2 5 3 4 6 4 5 6 6 4 2 43 2 2 4 6 6 1 6 1 6 5 5 3 1 34 5 3 6 6 1 2 2 5 4 4 2 1 5 35 1 4 6 4 2 4 2 5 4 6 2 6 2 21 4 4 3 1 2 1 6 3 5 1 6 4 2 46 6 5 2 3 6
the number of 1s;0 = 0%
the number of 2s;0 = 0%
the number of 3s;0 = 0%
the number of 4s;0 = 0%
the number of 5s;0 = 0%
the number of 6s;1 = 1.28205%
do you want to run the program agin? (1 for yes, 2 for No)