当前位置:网站首页>1131: genetic correlation
1131: genetic correlation
2022-06-30 14:49:00 【I would, I think】
Be careful : The first is count Must be double type ,len yes int type ,m=double(count/len)
#include<string.h>
#include<iostream>
using namespace std;
int main()
{
char s1[501],s2[501];
double count;//count Must be double type
double c;
double m;
int len;
int i;
cin>>c>>s1>>s2;
len=strlen(s1);
for(i=1; i<=len; i++)
if(s1[i]==s2[i])
count++;
m=double(count/len);
if(m>=c)
cout<<"yes"<<endl;
else
cout<<"no"<<endl;
return 0;
}
Pay attention to the second :len and count Must be double type ,m=count/len perhaps m=double(count/len)
#include<string.h>
#include<iostream>
using namespace std;
int main()
{
char s1[501],s2[501];
double len,count;
double c;
double m;
int i;
cin>>c>>s1>>s2;
len=strlen(s1);
for(i=1; i<=len; i++)
if(s1[i]==s2[i])
count++;
m=count/len;
if(m>=c)
cout<<"yes"<<endl;
else
cout<<"no"<<endl;
return 0;
}
边栏推荐
- 立式加工中心调试的步骤
- On simple code crawling Youdao translation_ 0's problem (to be solved)
- Laravel RBAC laravel permission use
- [buuctf] [geek challenge 2019] secret file
- [extensive reading of papers] a delicious recipe analysis framework for exploring multi modal recipes with variable attributes
- 1 figure to explain the difference and connection between nodejs and JS
- How to realize selective screen recording for EV screen recording
- val_ Loss decreases first and then increases or does not decrease but only increases
- @Component use cases
- Data recovery software easyrecovery15 Download
猜你喜欢

August 24, 2021 deque queue and stack

Introduction to the construction and development of composer private warehouse

After the MySQL service on the local computer is started and stopped, some services will automatically stop when they are not used by other services or programs

Clear the route cache in Vue

CCF access control system (Full Score code + problem solving idea) 201412-1

XSS challenge (1-5) more detailed answers

PS tip: the video frame to Layer command cannot be completed because dynamiclink is not available

2021 geek challenge Web

CCF Z-scan (full mark code + problem solving ideas) 201412-2

KnightCTF WEB
随机推荐
How does hbuilder display in columns?
How many questions can you answer for the interview of Mechanical Engineer?
CCF sequence segmentation (Full Score code + problem solving idea) 201509 -1
CCF access control system (Full Score code + problem solving idea) 201412-1
PS tip: the video frame to Layer command cannot be completed because dynamiclink is not available
Ctfshow getting started with the web (ThinkPHP topic)
Binary rotation array (1)
One dimensional and two dimensional array addresses
机械工程师面试的几个问题,你能答上来几个?
CCF call auction (full mark code + problem solving ideas + skill summary) 201412 - 3
Use of laravel repository mode
V3_ Chrome extended Chinese translation document V3 directory
Machine learning feature selection
立式加工中心调试的步骤
Problem: wechat developer tool visitor mode cannot use this function
PS dynamic drawing
CCF elimination games (Full Score code + problem solving ideas + skill summary) February 2, 2015
V3 01_ Welcome
Sorting by character frequency
PHP 2D array change key name