This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//###################### Prac-1 ########################## // | |
// Input an integer number and output the last digit of the given number // | |
// ####################################################### // | |
#include <stdio.h> | |
int main() | |
{ | |
int num, ld; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//###################### Prac-2 ########################## // | |
// Input an integer number and output the individual digits of the given number and sum of the individual digits // | |
// ####################################################### // | |
#include <stdio.h> | |
int main() | |
{ | |
int num; | |
int fd, sd, td; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//###################### Prac-3 ########################## // | |
// Input an integer number and output the given number in reverse // | |
// ####################################################### // | |
#include <stdio.h> | |
int main() | |
{ | |
int num; | |
int fd, sd, td; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//###################### Prac-4 ########################## // | |
// Input an integer number and output the given number in reverse between last two digits // | |
// ####################################################### // | |
#include <stdio.h> | |
int main() | |
{ | |
int num; | |
int fd, sd, td; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int a, b, c; | |
int ns, avg; | |
ns = 0; | |
while( ns <= 2 ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int i; | |
printf("Even Numbers Between 0 to 99 are given below :"); | |
for ( i = 0; i <= 98; i = i + 2 ) | |
{ | |
printf("\n%d", i); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
/*==================Variable Declarations & Assignments========================*/ | |
int lowLimit, highLimit, low, high; | |
int countLines = 0, sum_ev = 0, sum_od = 0, sum_prm = 0; | |
int constant_prm; | |
/*=============================================================================*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_POST["submit"])) | |
{ | |
// if submitted assign variables values | |
$low = $_POST["lowNum"]; | |
$highLimit = $_POST["highNum"]; | |
$countLines = 0; | |
$sum_ev = 0; | |
$sum_od = 0; | |
$sum_prm = 0; |