Skip to content

Instantly share code, notes, and snippets.

@kdmkdmkdm
kdmkdmkdm / gist:6632984
Created September 20, 2013 03:34
average
// Qaverage.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
@kdmkdmkdm
kdmkdmkdm / gist:6617063
Created September 18, 2013 23:12
helloworld
// 2.10forcomplex.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
for(int cnt1 = 0, int cnt2 = 9; cnt1 < 10; ++cnt1, --cnt2)
@kdmkdmkdm
kdmkdmkdm / gist:6617041
Created September 18, 2013 23:10
hello world
#include <iostream>
using namespace std;
int main()
{
for(int cnt1 = 0, int cnt2 = 9; cnt1 < 10; ++cnt1, --cnt2)
{
cout << cnt1 << "---Hello, World!---" << cnt2 << endl;
}
}
@kdmkdmkdm
kdmkdmkdm / gist:6602476
Created September 17, 2013 23:56
if-else help
// 2.6elseif.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
@kdmkdmkdm
kdmkdmkdm / gist:5962390
Created July 9, 2013 23:58
How can I run this C program?
// firstHeadsUpC.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdio.h>
int main ()
{
int decks;
// #include "stdafx.h" seems to be something I have to include every time...
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
int main()
{
char card_name[3];
puts("Enter a card name: ");
// invetoryDisplayer.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
// Inventory Displayer
// Demonstrates constant references
#include <iostream>
#include <string>
@kdmkdmkdm
kdmkdmkdm / gist:4680329
Created January 31, 2013 04:54
cout break up
#include <iostream>
using namespace std;
int main()
{
cout << "Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
cout << "Praesent cursus condimentum nulla id tempor.";
cout << "Suspendisse lobortis sodales sodales.";
cout << "Quisque sollicitudin ullamcorper dolor at commodo.";
cout << "Pellentesque eu nisi felis, eu tincidunt arcu. Aenean quis mauris neque."
#include <iostream>
using namespace std;
int main()
{
cout << "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent cursus condimentum nulla id tempor. Suspendisse lobortis sodales sodales. Quisque sollicitudin ullamcorper dolor at commodo. Pellentesque eu nisi felis, eu tincidunt arcu. Aenean quis mauris neque. Nunc mollis ligula non arcu venenatis fringilla congue lectus malesuada. Vivamus in magna tortor, et dignissim ipsum. Nam id lacinia arcu. Sed turpis magna, cursus non congue nec, hendrerit eu metus. Mauris mattis, justo ac consequat gravida, justo leo fermentum sem, non rutrum eros leo vitae diam." << endl;
return 0;
}
@kdmkdmkdm
kdmkdmkdm / gist:4641069
Created January 26, 2013 08:32
needstweaking
// favoritegamesprogram.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
// Favorite Games Program
#include <iostream>
#include <string>
#include <vector>