我在下面的编码中有Lvalue错误请帮我解决这个错误 [英] i am having Lvalue error in the below coding Please help me to solve this error

查看:76
本文介绍了我在下面的编码中有Lvalue错误请帮我解决这个错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

/* c program to find multiplication table up to 10. */
#include <stdio.h>
int main ()
{
    int n, i;
    printf("Enter an integer to find multiplication table: ");
    scanf("%d",&n);
    for((i=1);i<=10;++1)
    {
	 printf("%d * %d = %d\n", n, i, n*i);
    }
    return 0;
 }</stdio.h>

推荐答案

在这一行中

In this line
for((i=1);i<=10;++1)



你试图增加常数(L值)数 1

它应该是变量 i 而不是。


这篇关于我在下面的编码中有Lvalue错误请帮我解决这个错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆