Argonath RPG - A World of its own

Argonath RPG Community => Hardware/Software support => Resolved issues => Topic started by: Daco on April 24, 2010, 12:09:55 pm

Title: Visual Studio 2010 Expert Needed
Post by: Daco on April 24, 2010, 12:09:55 pm
Hi,

I am a complete noob in Visual Studio (2010 version here) and can't seem to execute this C# code:

Code: [Select]
/**************************\

 *  nombre_premier1.c     *
\**************************/

/* algorithme : teste tous les diviseurs */
#include <stdio.h>


int main (void)
{
  int i, nb, compter, test;
  test = compter = 0;
  printf ("Entrez un nombre entier : ");
  if (scanf ("%d", &nb) != 1)
    return -1;

  for (i = 2; i < nb; i++, compter++)
    if (nb % i == 0)
      test = 1;
  if (!test)
    printf ("%d nombre premier, nombre iterations = %d\n", nb, compter);
  else
    printf ("%d n'est pas nombre premier, nombre iterations = %d\n", nb,compter);
  return 0;
}

If someone can help me how to run/execute whatever into a program please. :(
Title: Re: Visual Studio 2010 Expert Needed
Post by: Chase on April 24, 2010, 05:59:43 pm
That's C++, not C#.
SimplePortal 2.3.7 © 2008-2025, SimplePortal