課題1
#include <stdio.h>

main()
{
int i,j;
do
{
scanf("%d",&i);
if(i%2)
{
j=i*2;
}else
{
j=i*3+1;
}while(i!=1);

}

この辺までしか分かりませんでした。