学习打卡
欢迎观看一叶子鲜补水面膜的打卡日志
c:日常学习 刷题
#include <stdio.h>
struct pos{int x,y;}
int getvalue(struct pos a,struct pos b,struct pos c,struct pos d)
{ struct pos s,t;
int flag;
s.x=a.x-b.x;
s.y=a.y-b.y;
t.x=c.x-d.x;
t.y=c.y-d.y;
flag=s.xt.x+s.yt.y;
printf(“flag=%d\n”,flag);
return flag>0;
}
int main()
{
struct pos p1 = {3,2},p2 = {1,2},p3 = {0,1},p4 = {2,0};
printf("%d\n",getvalue(p1,p2,p3,p4));
return 0;
}
python:
教学刷题
指定数目打印
if name == ‘main’:
n = 1
while n <= 7:
a = int(raw_input(‘input a number:\n’))
while a < 1 or a > 50:
a = int(raw_input(‘input a number:\n’))
print a * ‘*’
n += 1