Latest topics
» உமா ரமணன் பாடல்கள்by heezulia Today at 4:30 pm
» நிலவோடு வான்முகம் வான்முகில்
by heezulia Today at 4:22 pm
» ஈகரை வருகை பதிவேடு
by ayyasamy ram Today at 3:53 pm
» எதையும் சாதாரணமாக எடுத்து கொள்வது நல்லது!
by ayyasamy ram Today at 12:55 pm
» மின்னூல் தொகுப்புகள் — TI Buhari
by i6appar Today at 9:18 am
» திரைத்துளிகள்
by ayyasamy ram Today at 7:22 am
» சசிகுமாருக்கு ஜோடியாகும் சிம்ரன்!
by ayyasamy ram Today at 7:20 am
» பேய் படமாக உருவாகும் ‘பார்க்’
by ayyasamy ram Today at 7:19 am
» பி.டி.உஷா – பிறந்த நாள்
by ayyasamy ram Today at 7:17 am
» கெலன் கெல்லர் -பிறந்த நாள்
by ayyasamy ram Today at 7:16 am
» பங்கிம் சந்திர சட்டர்ஜி!
by ayyasamy ram Today at 7:16 am
» நீதிக்கதை – அன்பை விதையுங்கள்
by ayyasamy ram Today at 7:14 am
» இரயில் பயணிகளுக்கு சில முக்கிய தகவல்கள்
by ayyasamy ram Today at 7:13 am
» தம்பிக்கு எட்டும்…(விடுகதை)
by ayyasamy ram Today at 7:12 am
» சமாளிக்கும் திறமையே வெற்றியைத் தரும்
by ayyasamy ram Today at 7:10 am
» ஒரே படத்ல ரெண்டு ஹீரோயின் ஹீரோ சேந்து நடிச்ச படங்கள்
by heezulia Yesterday at 11:09 pm
» நாட்டு நடப்பு -காரட்டூன் (ரசித்தவை)
by ayyasamy ram Yesterday at 10:41 pm
» பிரிட்டனுக்கு சவால்கள் காத்திருக்கின்றன - ஸ்டார்மர்
by ayyasamy ram Yesterday at 10:40 pm
» ஆம்ஸ்ட்ராங் படுகொலை: கைதாகியிருப்பவர்கள் உண்மை குற்றவாளிகள் அல்ல.. திருமாவளவன் பகீர் குற்றச்சாட்டு!
by ayyasamy ram Yesterday at 10:31 pm
» கருத்துப்படம் 06/07/2024
by mohamed nizamudeen Yesterday at 10:17 pm
» ஒரு படத்தில ரெண்டு தடவ வந்த ஒரே பாட்டு
by heezulia Yesterday at 9:12 pm
» நிலா பாட்டுக்கள்
by heezulia Yesterday at 9:00 pm
» காசினிக் கீரை – மருத்துவ பயன்கள்
by ayyasamy ram Yesterday at 7:53 pm
» போன்சாய் …கனவு- புதுக்கவிதை
by ayyasamy ram Yesterday at 7:52 pm
» மனிதனுக்கு அழகு!- ஹைகூ
by ayyasamy ram Yesterday at 7:51 pm
» அப்பா வித்த கடைசி வயல்- புதுக்கவிதை
by ayyasamy ram Yesterday at 7:51 pm
» அறிவுக் களஞ்சியம்
by i6appar Yesterday at 7:50 pm
» கவிஞர் கூட்டமே! – புதுக்கவிதை
by ayyasamy ram Yesterday at 7:49 pm
» ஆன்மா அழிவதில்லை – புதுக்கவிதை
by ayyasamy ram Yesterday at 7:49 pm
» கொழந்தைங்க, சின்ன புள்ளைங்க நடிச்ச பாட்டுக்கள்
by heezulia Yesterday at 7:41 pm
» தமிழ் படங்களின் டைட்டில் பாட்டுக்கள்
by heezulia Yesterday at 7:19 pm
» தமிழ் சினிமாவில் இடம் பெற்ற கதாகாலட்சேபங்கள் மற்றும் தெருக்கூத்து, மேடை நிகழ்ச்சிகள்
by heezulia Yesterday at 7:11 pm
» காமெடி நடிகை - நடிகர்கள் நடிச்ச பாட்டு
by heezulia Yesterday at 6:28 pm
» சினிமா கலைஞர்கள் பாடிய பாட்டு
by heezulia Yesterday at 4:12 pm
» புன்னகை
by Anthony raj Yesterday at 3:29 pm
» நாவல்கள் வேண்டும்
by Guna.D Yesterday at 3:22 pm
» தோழி - தோழர் நட்பு பாட்டு
by heezulia Yesterday at 2:30 pm
» நடிகை, நடிகர்கள் மாறு வேஷத்துல நடிச்ச பாட்டுக்கள்
by heezulia Yesterday at 2:05 pm
» ஜனனி நவீன் நாவல் கட்டிக் கரும்பே குட்டித் திமிரே நாவல் வேண்டும்
by மொஹமட் Yesterday at 2:01 pm
» அழகான, சிங்காரமான அலங்கார அழகு பாட்டுக்கள்
by heezulia Yesterday at 1:28 pm
» தமிழ் சினிமால ஜாலியா பாட்டு பாடிட்டே பயணம் செஞ்ச பாட்டுக்கள்
by heezulia Yesterday at 1:07 pm
» சுசீலா பாடிய சிறப்பு பாட்டுக்கள் - வீடியோ
by heezulia Yesterday at 12:23 pm
» எஸ் ராமகிருஷ்ணன் - உணவு யுத்தம் - சுருக்கம்
by கண்ணன் Yesterday at 11:19 am
» ரெண்டு, மூணு ரோல்ல நடிச்ச நடிகை, நடிகர்கள்
by heezulia Yesterday at 10:59 am
» கூடை நிறைய லட்சியங்கள்
by Anthony raj Fri Jul 05, 2024 8:18 pm
» இருள் என்ற ஒன்று இல்லை!- ஓஷோ
by Anthony raj Fri Jul 05, 2024 8:09 pm
» கிட்டப்பார்வையைத் தடுக்க….
by Anthony raj Fri Jul 05, 2024 7:59 pm
» அறிய வேண்டிய ஆன்மிகத் துணுக்குகள்
by Anthony raj Fri Jul 05, 2024 7:57 pm
» அலங்கார முகமூடிகள்!
by Anthony raj Fri Jul 05, 2024 7:53 pm
» சிக்கன் குழம்புல மீன் குழம்பு வாசம் வரணும்!!- வலைப்பேச்சு
by Anthony raj Fri Jul 05, 2024 7:42 pm
Top posting users this week
heezulia |
| |||
ayyasamy ram |
| |||
i6appar |
| |||
Anthony raj |
| |||
T.N.Balasubramanian |
| |||
mohamed nizamudeen |
| |||
Dr.S.Soundarapandian |
| |||
Guna.D |
| |||
மொஹமட் |
| |||
prajai |
|
Top posting users this month
heezulia |
| |||
ayyasamy ram |
| |||
i6appar |
| |||
Anthony raj |
| |||
T.N.Balasubramanian |
| |||
mohamed nizamudeen |
| |||
Dr.S.Soundarapandian |
| |||
Guna.D |
| |||
மொஹமட் |
| |||
prajai |
|
நிகழ்நிலை நிர்வாகிகள்
C++ expert - உதவி தேவை - மதுமிதா
+3
ராஜு சரவணன்
பூவன்
மதுமிதா
7 posters
Page 4 of 7
Page 4 of 7 • 1, 2, 3, 4, 5, 6, 7
C++ expert - உதவி தேவை - மதுமிதா
First topic message reminder :
C++ expert இங்க யாராவது இருக்காங்களா?
நமது ஈகரைல
C++ expert இங்க யாராவது இருக்காங்களா?
நமது ஈகரைல
Re: C++ expert - உதவி தேவை - மதுமிதா
யினியவன் wrote:{
இது ஏதோ ஒரு லைன்ல மிஸ் ஆகுது மது - கண்டுபிடிங்க - எத்தனை லைன் ப்ரோக்ராம்?
ஒரு லைன் தானாம்
பூவன்- வி.ஐ.பி
- பதிவுகள் : 17648
இணைந்தது : 21/09/2011
Re: C++ expert - உதவி தேவை - மதுமிதா
Indentation யூஸ் பண்ணுவீங்களா? யூஸ் பண்ணினா மெக்சிமம் தவறுகளை அவாய்ட் பண்ணலாம்
![](https://i.servimg.com/u/f42/15/92/96/93/barrab10.png)
யினியவன்- சிறப்புப் பதிவாளர்
- பதிவுகள் : 29722
இணைந்தது : 06/01/2012
Re: C++ expert - உதவி தேவை - மதுமிதா
யினியவன் wrote:Indentation யூஸ் பண்ணுவீங்களா? யூஸ் பண்ணினா மெக்சிமம் தவறுகளை அவாய்ட் பண்ணலாம்
தல for loop தான் பிரச்சனை
![புன்னகை](https://2img.net/i/fa/i/smiles/icon_smile.gif)
Re: C++ expert - உதவி தேவை - மதுமிதா
like vi editor?யினியவன் wrote:Indentation யூஸ் பண்ணுவீங்களா? யூஸ் பண்ணினா மெக்சிமம் தவறுகளை அவாய்ட் பண்ணலாம்
Re: C++ expert - உதவி தேவை - மதுமிதா
மது இது புதுசு அதே ஃபங்சன் கொண்டது ![புன்னகை](https://2img.net/i/fa/i/smiles/icon_smile.gif)
/* C program to demonstrate travelling salesperson problem. */
/* About this algorithm:
* Here we use dynamic programming to find a solution to the
* travelling salesperson problem. The problem consists of finding
* the least-cost cycle in a given set of nodes. */
#include
#define MAX 100
#define INFINITY 999
int tsp_dp (int c[][MAX], int tour[], int start, int n);
int main()
{
int n; /* Number of cities. */
int i, j; /* Loop counters. */
int c[MAX][MAX]; /* Cost matrix. */
int tour[MAX]; /* Tour matrix. */
int cost; /* Least cost. */
printf ("This program demonstrates the TSP problem.");
printf ("\nHow many cities to traverse? ");
scanf ("%d", &n);
printf ("Enter the cost matrix: (999: no connection)\n");
for (i=0; i for (j=0; j scanf ("%d", &c[i][j]);
for (i=0; i tour[i] = i;
cost = tsp_dp (c, tour, 0, n);
printf ("Minimum cost: %d.\nTour: ", cost);
for (i=0; i printf ("%d ", tour[i]+1);
printf ("1\n");
}
int tsp_dp (int c[][MAX], int tour[], int start, int n)
{
int i, j, k; /* Loop counters. */
int temp[MAX]; /* Temporary during calculations. */
int mintour[MAX]; /* Minimal tour array. */
int mincost; /* Minimal cost. */
int ccost; /* Current cost. */
/* End of recursion condition. */
if (start == n - 2)
return c[tour[n-2]][tour[n-1]] + c[tour[n-1]][0];
/* Compute the tour starting from the current city. */
mincost = INFINITY;
for (i = start+1; i { for (j=0; j temp[j] = tour[j];
/* Adjust positions. */
temp[start+1] = tour[i];
temp[i] = tour[start+1];
/* Found a better cycle? (Recurrence derivable.) */
if (c[tour[start]][tour[i]] +
(ccost = tsp_dp (c, temp, start+1, n)) < mincost) {
mincost = c[tour[start]][tour[i]] + ccost;
for (k=0; k mintour[k] = temp[k];
}
}
/* Set the minimum-tour array. */
for (i=0; i tour[i] = mintour[i];
return mincost;
}
![புன்னகை](https://2img.net/i/fa/i/smiles/icon_smile.gif)
/* C program to demonstrate travelling salesperson problem. */
/* About this algorithm:
* Here we use dynamic programming to find a solution to the
* travelling salesperson problem. The problem consists of finding
* the least-cost cycle in a given set of nodes. */
#include
#define MAX 100
#define INFINITY 999
int tsp_dp (int c[][MAX], int tour[], int start, int n);
int main()
{
int n; /* Number of cities. */
int i, j; /* Loop counters. */
int c[MAX][MAX]; /* Cost matrix. */
int tour[MAX]; /* Tour matrix. */
int cost; /* Least cost. */
printf ("This program demonstrates the TSP problem.");
printf ("\nHow many cities to traverse? ");
scanf ("%d", &n);
printf ("Enter the cost matrix: (999: no connection)\n");
for (i=0; i
for (i=0; i
cost = tsp_dp (c, tour, 0, n);
printf ("Minimum cost: %d.\nTour: ", cost);
for (i=0; i
printf ("1\n");
}
int tsp_dp (int c[][MAX], int tour[], int start, int n)
{
int i, j, k; /* Loop counters. */
int temp[MAX]; /* Temporary during calculations. */
int mintour[MAX]; /* Minimal tour array. */
int mincost; /* Minimal cost. */
int ccost; /* Current cost. */
/* End of recursion condition. */
if (start == n - 2)
return c[tour[n-2]][tour[n-1]] + c[tour[n-1]][0];
/* Compute the tour starting from the current city. */
mincost = INFINITY;
for (i = start+1; i
/* Adjust positions. */
temp[start+1] = tour[i];
temp[i] = tour[start+1];
/* Found a better cycle? (Recurrence derivable.) */
if (c[tour[start]][tour[i]] +
(ccost = tsp_dp (c, temp, start+1, n)) < mincost) {
mincost = c[tour[start]][tour[i]] + ccost;
for (k=0; k
}
}
/* Set the minimum-tour array. */
for (i=0; i
return mincost;
}
ஜாஹீதாபானு- நிர்வாகக் குழு
- பதிவுகள் : 31436
இணைந்தது : 16/04/2011
Re: C++ expert - உதவி தேவை - மதுமிதா
கொஞ்சம் எர்ரர் காட்டுதூ அண்ணா சாப்பிட்டு வந்து தான் பார்க்கணும் ரொம்ப ரொம்ப தாங்க்ஸ் அண்ணாராஜு சரவணன் wrote:நல்ல வேலை செய்யுது பார்த்து சொல்லுங்கள்
Re: C++ expert - உதவி தேவை - மதுமிதா
என் ஃப்ரெண்ட் பக்கத்துல இருந்த இதலாம் நான் கேக்க மாட்டேனா அப்படி தான்ஜாஹீதாபானு wrote:எப்போ பார்த்தாலும் கேள்வி தானா மது
Page 4 of 7 • 1, 2, 3, 4, 5, 6, 7
![-](https://i.servimg.com/u/f86/18/21/41/30/minus-11.png)
» உதவி தேவை - HD வீடியோக்களை தரம் குறையாமல் format மாற்றும் மென்பொருள் தேவை
» உதவி தேவை ராமாயண பாடல் ஒன்று தேவை
» உதவி உதவி தேவை.....
» உதவி தேவை
» ஒரு உதவி தேவை
» உதவி தேவை ராமாயண பாடல் ஒன்று தேவை
» உதவி உதவி தேவை.....
» உதவி தேவை
» ஒரு உதவி தேவை
Page 4 of 7
Permissions in this forum:
You cannot reply to topics in this forum
|
|