Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
1111 と入力しましたが、最初の 1 しか表示されません。xcode をアンインストールして再度インストールしようとしましたが、うまくいきませんでした。
int main() { int num; printf("input: "); scanf("%d",&num); printf("%d",num); return 0; }
出力
入力: 1 1111
入力: 1
1111
ObjectiveCの初心者向けチュートリアルを使用する必要があります。
変数(この場合は整数)を「printf」する場合は、次のことを行う必要があります。
NSLog(@"My number is %d",num);
NSStringを「printf」する場合は、次のようにする必要があります。
NSLog(@"My string is %@",String);