我在此问题中遇到运行时错误uva Tell me the frequencies! 有人可以帮助我,告诉我为什么我会这样做? 这是我的代码
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int dic[96];
int main()
{
char input [101];
int i;
while (gets(input))
{
int lenght = strlen(input);
for (i = 0; i < lenght; i++)
{
dic[input[i]-32]++;
}
int j;
for (i = 1; i < 96; i++)
{
for (j = 0; j < 96; j++)
{
if (dic[j] == i)
printf("%d %d\n",j+32,dic[j]);
}
}
printf("\n");
memset(dic, 0, sizeof(dic));
}
return 0;
}
答案 0 :(得分:0)
INSERT INTO `table` (value1, value2)
SELECT 'stuff for value1', 'stuff for value2' FROM DUAL
WHERE NOT EXISTS (SELECT * FROM `table`
WHERE value1='stuff for value1' AND value2='stuff for value2')
LIMIT 1