Skip to content

Instantly share code, notes, and snippets.

View sohana08's full-sized avatar
🎯
Focusing

HaNa sohana08

🎯
Focusing
View GitHub Profile
@sohana08
sohana08 / to check if a character of string is a vowel or not
Created November 20, 2016 15:52
i want to check whether a character of a string is a vowel or not but i dont have any idea of it. following is code i have tried of.
<script>
function checkStr(string1)
{
var vowel_list='aeiouAEIOU';
for(var i=0;i<string1.length;i++)
{
if(string1[i]!==vowel_list
{
return false;
}
@sohana08
sohana08 / sum of numbers in an array
Created November 21, 2016 04:11
can anyone help me with the following,how to pass an array as an argument
<DOCTYPE! html>
<html>
<head>
</head>
<body>
<script type="text/javascript">
var myarr=[1,2,3,4,5];
function sum(arr) {
var sum1=0;
var length=myarr.length;
#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int m;
cin>>m;
#include <iostream>
using namespace std;
void insertionSort(int n, int * arr)
{
int temp,i,j,k;
for(i=1;i<n;i++)
{
j=i;
while(j>0 && arr[j]<arr[j-1])