This file contains hidden or 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
| //By Muhammad Umer Farooq | |
| #include <iostream> | |
| namespace ReverseNumber | |
| { | |
| int rem = 0; int rev = 0; | |
| int for_loop(int n) | |
| { | |
| for (n; n != 0; n /= 10) { // for (n; n > 0; n /= 10), for (;n != 0; n /= 10) | |
| rem = n % 10; |
This file contains hidden or 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
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <title>Flood</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
| </head> | |
| <body> | |
| <div> | |
| <span id='status'></span> | |
| </div> |
This file contains hidden or 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 <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| //Default size of array | |
| const int m = 8; | |
| //Loop variables and count to store values in C array | |
| int i, j, k,t = 1; |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="format-detection" content="telephone=no" /> | |
| <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> | |
| <link rel="stylesheet" type="text/css" href="css/index.css" /> | |
| <title>Google OAuth with PhoneGap</title> | |
| </head> | |
| <body> |
This file contains hidden or 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'])) { | |
| $text = (null !== empty(trim($_POST['text']))) ? stripslashes(trim(htmlentities(htmlspecialchars(strip_tags($_POST['text']), ENT_QUOTES | ENT_HTML5, 'UTF-8'), ENT_QUOTES | ENT_HTML5, 'UTF-8'))) : ''; | |
| if ('' !== $text) { | |
| $spilt = explode(' ', $text); | |
| echo "<strong>Counts:</strong><br/ >"; | |
| foreach (array_unique($spilt) as $key => $value) { | |
| $count = substr_count($text, $value); | |
| echo "<b>$value:</b> <i>$count</i> <br>"; |
This file contains hidden or 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 <iostream> | |
| using namespace std; | |
| namespace lablnet { | |
| bool is_prime(int n) | |
| { | |
| bool isPrime = true; | |
| for (int i = n - 1; i >= 2; i--) | |
| { | |
| if (n % i == 0) |
This file contains hidden or 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
| //usr/bin/g++ | |
| #include <iostream> | |
| int main() { | |
| const int S = 5, M = 6, max = 1000; | |
| int subjects[S][M], avg[S], sum = 0; | |
| char students[S][max]; | |
| // Read the mark for students. | |
| for (int i = 0; i < S; i++) { |
This file contains hidden or 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
| 1 | Ali | 230 | |
|---|---|---|---|
| 5 | Bilal | 255 | |
| 6 | Pasha | 430 |
This file contains hidden or 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<iostream> | |
| #include<fstream> | |
| using namespace std; | |
| // define a structure to store student data | |
| struct student { | |
| int sapid; | |
| char name[30]; | |
| float marks; | |
| void getData(); // get student data from user | |
| void displayData(); // display data |
This file contains hidden or 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 <iostream> | |
| #include <chrono> | |
| using namespace std; | |
| bool isPrime(long long int); | |
| int main(){ | |
| long long int n=0; | |
| cout<<"Enter number"<<endl; | |
| cin>>n; | |
| auto start=chrono::high_resolution_clock::now(); |